/**
 * Cardtime Casino - Main Stylesheet
 * Prefix: g246-
 * Mobile-first responsive design with sophisticated neutral palette
 */

/* ===== CSS Variables ===== */
:root {
  --g246-primary: #5D5D5D;
  --g246-secondary: #E0E0E0;
  --g246-accent: #EEE8AA;
  --g246-dark: #34495E;
  --g246-light: #FFF8DC;
  --g246-neutral: #808080;

  --g246-bg: #FFF8DC;
  --g246-bg-alt: #E0E0E0;
  --g246-text: #34495E;
  --g246-text-light: #5D5D5D;
  --g246-border: #808080;

  --g246-shadow-sm: 0 2px 4px rgba(52, 73, 94, 0.08);
  --g246-shadow-md: 0 4px 8px rgba(52, 73, 94, 0.12);
  --g246-shadow-lg: 0 8px 16px rgba(52, 73, 94, 0.16);

  --g246-radius-sm: 4px;
  --g246-radius-md: 8px;
  --g246-radius-lg: 12px;

  --g246-transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
  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: var(--g246-text);
  background-color: var(--g246-bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--g246-primary);
  text-decoration: none;
  transition: var(--g246-transition);
}

a:hover {
  color: var(--g246-dark);
}

/* ===== Container ===== */
.g246-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

.g246-wrapper {
  width: 100%;
  padding: 2rem 0;
}

/* ===== Header ===== */
.g246-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--g246-dark) 0%, var(--g246-primary) 100%);
  box-shadow: var(--g246-shadow-md);
  z-index: 1000;
  padding: 1.2rem 0;
}

.g246-header-content {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.g246-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.g246-logo {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: var(--g246-radius-sm);
}

.g246-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g246-light);
  text-transform: capitalize;
}

.g246-header-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.g246-btn {
  padding: 0.8rem 1.6rem;
  border-radius: var(--g246-radius-md);
  font-size: 1.4rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--g246-transition);
  white-space: nowrap;
}

.g246-btn-primary {
  background: var(--g246-accent);
  color: var(--g246-dark);
}

.g246-btn-primary:hover {
  background: #E6DF9A;
  transform: translateY(-2px);
  box-shadow: var(--g246-shadow-md);
}

.g246-btn-secondary {
  background: transparent;
  color: var(--g246-light);
  border: 1px solid var(--g246-light);
}

.g246-btn-secondary:hover {
  background: rgba(255, 248, 220, 0.1);
}

.g246-menu-toggle {
  background: none;
  border: none;
  color: var(--g246-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Mobile Menu ===== */
.g246-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(52, 73, 94, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: var(--g246-transition);
  z-index: 9998;
}

.g246-menu-overlay.g246-overlay-active {
  opacity: 1;
  visibility: visible;
}

.g246-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--g246-light);
  box-shadow: var(--g246-shadow-lg);
  transition: right 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
}

.g246-mobile-menu.g246-menu-active {
  right: 0;
}

.g246-menu-header {
  padding: 2rem 1.6rem;
  background: linear-gradient(135deg, var(--g246-dark) 0%, var(--g246-primary) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.g246-menu-close {
  background: none;
  border: none;
  color: var(--g246-light);
  font-size: 2.4rem;
  cursor: pointer;
}

.g246-nav {
  padding: 2rem 0;
}

.g246-nav-link {
  display: block;
  padding: 1.2rem 1.6rem;
  color: var(--g246-text);
  font-size: 1.5rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--g246-transition);
}

.g246-nav-link:hover,
.g246-nav-link.g246-nav-active {
  background: var(--g246-bg-alt);
  border-left-color: var(--g246-accent);
  color: var(--g246-dark);
}

/* ===== Main Content ===== */
.g246-main {
  margin-top: 6rem;
  padding-bottom: 8rem;
  min-height: calc(100vh - 14rem);
}

/* ===== Carousel ===== */
.g246-carousel {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto 2rem;
  overflow: hidden;
  border-radius: var(--g246-radius-lg);
  box-shadow: var(--g246-shadow-md);
}

.g246-carousel-container {
  position: relative;
  width: 100%;
  height: 200px;
}

.g246-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.g246-slide.g246-slide-active {
  opacity: 1;
}

.g246-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g246-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
  z-index: 10;
}

.g246-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 248, 220, 0.5);
  cursor: pointer;
  transition: var(--g246-transition);
}

.g246-dot.g246-dot-active {
  background: var(--g246-accent);
  width: 24px;
  border-radius: 4px;
}

/* ===== Section ===== */
.g246-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--g246-bg-alt);
}

.g246-section:last-child {
  border-bottom: none;
}

.g246-section-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--g246-dark);
  margin-bottom: 1.6rem;
  text-align: center;
}

.g246-section-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--g246-primary);
  margin-bottom: 1.2rem;
}

/* ===== Game Grid ===== */
.g246-game-category {
  margin-bottom: 3rem;
}

.g246-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--g246-secondary) 0%, var(--g246-light) 100%);
  border-radius: var(--g246-radius-md);
}

.g246-category-icon {
  font-size: 2.4rem;
  color: var(--g246-dark);
}

.g246-category-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g246-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.g246-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.g246-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem;
  background: white;
  border-radius: var(--g246-radius-md);
  box-shadow: var(--g246-shadow-sm);
  transition: var(--g246-transition);
  cursor: pointer;
}

.g246-game-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--g246-shadow-md);
}

.g246-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--g246-radius-sm);
  object-fit: cover;
  margin-bottom: 0.6rem;
}

.g246-game-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--g246-text);
  text-align: center;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== Card Component ===== */
.g246-card {
  background: white;
  border-radius: var(--g246-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--g246-shadow-sm);
}

.g246-card-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--g246-dark);
  margin-bottom: 1.2rem;
}

.g246-card-text {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--g246-text-light);
  margin-bottom: 1rem;
}

/* ===== FAQ ===== */
.g246-faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.g246-faq-item {
  background: white;
  border-radius: var(--g246-radius-md);
  overflow: hidden;
  box-shadow: var(--g246-shadow-sm);
}

.g246-faq-question {
  padding: 1.6rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--g246-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--g246-transition);
}

.g246-faq-question:hover {
  background: var(--g246-bg-alt);
}

.g246-faq-icon {
  font-size: 2rem;
  transition: transform 0.3s ease;
}

.g246-faq-item.g246-faq-active .g246-faq-icon {
  transform: rotate(180deg);
}

.g246-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.g246-faq-item.g246-faq-active .g246-faq-answer {
  max-height: 500px;
}

.g246-faq-answer-content {
  padding: 0 1.6rem 1.6rem;
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--g246-text-light);
}

/* ===== Bottom Navigation ===== */
.g246-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--g246-dark) 0%, var(--g246-primary) 100%);
  box-shadow: 0 -2px 8px rgba(52, 73, 94, 0.15);
  z-index: 1000;
  padding: 0.8rem 0;
}

.g246-bottom-nav-container {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.g246-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 56px;
  color: rgba(255, 248, 220, 0.7);
  transition: var(--g246-transition);
  cursor: pointer;
  padding: 0.4rem;
}

.g246-bottom-nav-item:hover,
.g246-bottom-nav-item.g246-bottom-active {
  color: var(--g246-accent);
}

.g246-bottom-icon {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
}

.g246-bottom-label {
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
}

/* ===== Footer ===== */
.g246-footer {
  background: var(--g246-dark);
  color: var(--g246-light);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.g246-footer-section {
  margin-bottom: 2.4rem;
}

.g246-footer-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--g246-accent);
}

.g246-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.g246-footer-link {
  color: var(--g246-light);
  font-size: 1.4rem;
  transition: var(--g246-transition);
}

.g246-footer-link:hover {
  color: var(--g246-accent);
}

.g246-partners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1.6rem 0;
}

.g246-partner-logo {
  width: 100%;
  height: auto;
  opacity: 0.7;
  transition: var(--g246-transition);
}

.g246-partner-logo:hover {
  opacity: 1;
}

.g246-copyright {
  text-align: center;
  font-size: 1.3rem;
  color: rgba(255, 248, 220, 0.6);
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 248, 220, 0.1);
}

/* ===== Utility Classes ===== */
.g246-text-center {
  text-align: center;
}

.g246-mb-1 {
  margin-bottom: 1rem;
}

.g246-mb-2 {
  margin-bottom: 2rem;
}

.g246-mt-2 {
  margin-top: 2rem;
}

.g246-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.g246-animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Desktop Styles ===== */
@media (min-width: 769px) {
  .g246-bottom-nav {
    display: none;
  }

  .g246-main {
    padding-bottom: 2rem;
  }

  .g246-game-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===== Mobile Adjustments ===== */
@media (max-width: 768px) {
  .g246-main {
    padding-bottom: 8rem;
  }
}
