/**
 * FF777 Main CSS File
 * All classes use gf54 prefix for namespace isolation
 * Mobile-first responsive design
 */

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: #E0F2F1;
  background-color: #0D1117;
  min-width: 320px;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* CSS Variables for Color Palette */
:root {
  --gf54-primary: #008B8B;
  --gf54-secondary: #20B2AA;
  --gf54-accent: #E0F2F1;
  --gf54-bg-dark: #0D1117;
  --gf54-bg-medium: #3C3C3C;
  --gf54-text-light: #E0F2F1;
  --gf54-text-medium: #20B2AA;
  --gf54-border: #3C3C3C;
}

/* Container */
.gf54-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header Navigation */
.gf54-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(135deg, var(--gf54-bg-dark) 0%, var(--gf54-bg-medium) 100%);
  box-shadow: 0 2px 10px rgba(0, 139, 139, 0.3);
  z-index: 1000;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gf54-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--gf54-text-light);
  font-weight: 700;
  font-size: 1.8rem;
}

.gf54-logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.gf54-nav-buttons {
  display: flex;
  gap: 0.8rem;
}

.gf54-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.3rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.gf54-btn-primary {
  background: linear-gradient(135deg, var(--gf54-primary) 0%, var(--gf54-secondary) 100%);
  color: var(--gf54-text-light);
}

.gf54-btn-secondary {
  background: transparent;
  color: var(--gf54-secondary);
  border: 2px solid var(--gf54-secondary);
}

.gf54-btn:hover,
.gf54-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 139, 139, 0.4);
}

/* Mobile Menu Toggle */
.gf54-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.gf54-menu-toggle span {
  width: 24px;
  height: 3px;
  background-color: var(--gf54-text-light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Menu Dropdown */
.gf54-mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background-color: var(--gf54-bg-dark);
  box-shadow: 0 4px 20px rgba(0, 139, 139, 0.3);
  z-index: 9999;
  padding: 1rem 0;
}

.gf54-mobile-menu a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--gf54-text-light);
  text-decoration: none;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--gf54-border);
  transition: all 0.3s ease;
}

.gf54-mobile-menu a:hover,
.gf54-mobile-menu a:focus {
  background-color: var(--gf54-primary);
  padding-left: 2rem;
}

/* Main Content */
.gf54-main {
  margin-top: 70px;
  padding-bottom: 80px;
  min-height: calc(100vh - 70px);
}

/* Carousel */
.gf54-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 139, 139, 0.3);
}

.gf54-carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.gf54-carousel-slide.active {
  opacity: 1;
}

.gf54-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gf54-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.gf54-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(224, 242, 241, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gf54-carousel-dot.active {
  background-color: var(--gf54-primary);
  transform: scale(1.2);
}

/* Headings */
.gf54-heading {
  color: var(--gf54-text-light);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.gf54-heading h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gf54-primary);
  margin-bottom: 0.5rem;
}

.gf54-heading h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--gf54-secondary);
  margin-bottom: 1rem;
}

.gf54-heading h3 {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--gf54-text-light);
  margin-bottom: 0.8rem;
}

/* Section Styling */
.gf54-section {
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(13, 17, 23, 0.8) 0%, rgba(60, 60, 60, 0.3) 100%);
  border-radius: 10px;
  border: 1px solid var(--gf54-border);
}

/* Game Grid */
.gf54-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.gf54-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.gf54-game-item:hover {
  transform: scale(1.05);
}

.gf54-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 139, 139, 0.3);
}

.gf54-game-name {
  font-size: 1.1rem;
  color: var(--gf54-text-light);
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Game Category Section */
.gf54-category {
  margin-bottom: 2.5rem;
}

.gf54-category-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gf54-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gf54-secondary);
}

/* Promotional Links */
.gf54-promo-link {
  color: var(--gf64-secondary);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.gf54-promo-link:hover,
.gf54-promo-link:focus {
  color: var(--gf54-primary);
  text-decoration: underline;
}

.gf54-promo-btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--gf54-primary) 0%, var(--gf54-secondary) 100%);
  color: var(--gf54-text-light);
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 139, 139, 0.3);
}

.gf54-promo-btn:hover,
.gf54-promo-btn:focus {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 139, 139, 0.5);
}

/* Footer */
.gf54-footer {
  background: linear-gradient(135deg, var(--gf54-bg-dark) 0%, var(--gf54-bg-medium) 100%);
  padding: 2rem 1.5rem 8rem;
  border-top: 2px solid var(--gf54-border);
}

.gf54-footer-content {
  margin-bottom: 2rem;
}

.gf54-footer-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gf54-primary);
  margin-bottom: 1rem;
}

.gf54-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gf54-footer-links a {
  color: var(--gf54-text-medium);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.gf54-footer-links a:hover {
  color: var(--gf54-primary);
}

.gf54-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gf54-partner-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.gf54-partner-icon:hover {
  opacity: 1;
}

.gf54-copyright {
  text-align: center;
  font-size: 1.3rem;
  color: var(--gf54-text-light);
  opacity: 0.8;
}

/* Mobile Bottom Navigation */
.gf54-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: linear-gradient(180deg, var(--gf54-bg-dark) 0%, #1a1f2e 100%);
  border-top: 2px solid var(--gf54-primary);
  box-shadow: 0 -2px 10px rgba(0, 139, 139, 0.3);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0.5rem 0;
}

.gf54-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  min-height: 60px;
  justify-content: center;
  text-decoration: none;
  color: var(--gf54-text-light);
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 5px;
}

.gf54-bottom-nav a:hover,
.gf54-bottom-nav a:focus {
  background-color: rgba(0, 139, 139, 0.2);
  transform: scale(1.05);
}

.gf54-bottom-nav.gf54-nav-active a {
  color: var(--gf54-primary);
  background-color: rgba(0, 139, 139, 0.15);
}

.gf54-nav-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gf54-nav-text {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

/* Hide bottom navigation on desktop */
@media (min-width: 769px) {
  .gf54-bottom-nav {
    display: none;
  }

  .gf54-main {
    padding-bottom: 2rem;
  }

  .gf54-footer {
    padding-bottom: 2rem;
  }
}

/* Responsive Text */
@media (max-width: 380px) {
  body {
    font-size: 1.5rem;
  }

  .gf54-heading h1 {
    font-size: 2rem;
  }

  .gf54-heading h2 {
    font-size: 1.7rem;
  }

  .gf54-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Utility Classes */
.gf54-text-center {
  text-align: center;
}

.gf54-mt-1 {
  margin-top: 1rem;
}

.gf54-mb-1 {
  margin-bottom: 1rem;
}

.gf54-mt-2 {
  margin-top: 2rem;
}

.gf54-mb-2 {
  margin-bottom: 2rem;
}

/* Icon Library Integration */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
@import url('https://unpkg.com/ionicons@5.5.2/dist/css/ionicons.min.css');
