/* Mahjong Solitaire - Complete CSS Styles */
/* Pure CSS implementation - no build tools required */

/* CSS Variables for color system */
:root {
    /* Updated background color to #013d33 */
    --background: hsl(164, 100%, 12%);
    --foreground: hsl(45, 25%, 95%);

    /* Tile colors - cream ivory with dark grey text */
    --card: hsl(45, 25%, 95%);
    --card-foreground: hsl(0, 0%, 30%);

    --popover: hsl(45, 25%, 95%);
    --popover-foreground: hsl(0, 0%, 15%);

    /* Traditional Mahjong red */
    --primary: hsl(0, 70%, 45%);
    --primary-foreground: hsl(45, 25%, 95%);

    /* Traditional Mahjong blue */
    --secondary: hsl(220, 70%, 45%);
    --secondary-foreground: hsl(45, 25%, 95%);

    /* Muted tile shadow */
    --muted: hsl(45, 15%, 85%);
    --muted-foreground: hsl(0, 0%, 35%);

    /* Traditional green accent */
    --accent: hsl(140, 60%, 35%);
    --accent-foreground: hsl(45, 25%, 95%);

    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(45, 25%, 95%);

    /* Tile borders and shadows */
    --border: hsl(45, 15%, 75%);
    --input: hsl(45, 15%, 85%);
    --ring: hsl(0, 70%, 45%);

    /* Mahjong-specific design tokens */
    --mahjong-felt: hsl(164, 100%, 12%);
    --mahjong-tile: hsl(45, 25%, 95%);
    --mahjong-red: hsl(0, 70%, 45%);
    --mahjong-blue: hsl(220, 70%, 45%);
    --mahjong-green: hsl(140, 60%, 35%);
    --mahjong-gold: hsl(45, 80%, 50%);
    
    /* Gradients */
    --gradient-felt: linear-gradient(135deg, hsl(164, 100%, 14%), hsl(164, 100%, 10%));
    --gradient-tile: linear-gradient(145deg, hsl(45, 25%, 98%), hsl(45, 15%, 88%));
    --tile-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --tile-shadow-hover: 0 6px 12px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3);

    --radius: 0.5rem;
}

.video-caption {
  margin-top: 8px;
  font-size: 0.95rem;
  color: inherit;   /* same as surrounding text */
  text-align: center; /* center align */
  color:#4D4D4D;
}

.dark {
    /* Night mode with updated background color */
    --background: hsl(164, 100%, 8%);
    --foreground: hsl(45, 25%, 95%);

    --card: hsl(45, 15%, 90%);
    --card-foreground: hsl(0, 0%, 15%);

    --popover: hsl(45, 15%, 90%);
    --popover-foreground: hsl(0, 0%, 15%);

    --primary: hsl(0, 70%, 50%);
    --primary-foreground: hsl(45, 25%, 95%);

    --secondary: hsl(220, 70%, 50%);
    --secondary-foreground: hsl(45, 25%, 95%);

    --muted: hsl(45, 10%, 75%);
    --muted-foreground: hsl(0, 0%, 45%);

    --accent: hsl(140, 60%, 40%);
    --accent-foreground: hsl(45, 25%, 95%);

    --destructive: hsl(0, 75%, 55%);
    --destructive-foreground: hsl(45, 25%, 95%);

    --border: hsl(45, 10%, 65%);
    --input: hsl(45, 10%, 75%);
    --ring: hsl(0, 70%, 50%);

    /* Night mode overrides with updated background */
    --mahjong-felt: hsl(164, 100%, 8%);
    --gradient-felt: linear-gradient(135deg, hsl(164, 100%, 10%), hsl(164, 100%, 6%));
    --gradient-tile: linear-gradient(145deg, hsl(45, 15%, 92%), hsl(45, 10%, 82%));
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: var(--border);
}

body {
    background: var(--gradient-felt);
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--foreground);
    line-height: 1.6;
}

.mahjong-tile {
    background: var(--gradient-tile);
    box-shadow: var(--tile-shadow);
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mahjong-tile:hover {
    box-shadow: var(--tile-shadow-hover);
    transform: translateY(-2px);
}

.mahjong-section {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--tile-shadow);
    border: 2px solid var(--border);
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    width: 100%;
    background: var(--gradient-felt);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: static;
    z-index: 10;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
   
}

.logo {
    height: 3.2rem;
    margin-right: 20px !important;
}

.nav-menu {
    display: none;
    gap: 2rem;
}

.nav-link {
    background: none;
    border: none;
    color: var(--foreground);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: inherit;
    text-decoration: none;
    line-height: 1;
}

.nav-link:hover {
    color: var(--primary);
}

/* Mobile Menu */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--foreground);
}

.hamburger-icon, .close-icon {
    width: 24px;
    height: 24px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--gradient-felt);
    z-index: 2147483647;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Lock scroll and disable game interactions when menu is open */
body.menu-open {
    overflow: hidden;
}

.menu-open .game-frame {
    pointer-events: none;
}

.mobile-menu-content {
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.mobile-logo {
    height: 2.5rem;
}

.mobile-close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--foreground);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav-link {
    background: none;
    border: none;
    color: var(--foreground);
    font-weight: 500;
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: inherit;
    text-align: left;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    display: block;
}

.mobile-nav-link:hover {
    color: var(--primary);
}

@media (min-width: 1160px) {
    .nav-menu {
        display: flex;
    }
    
    .mobile-menu-button {
        display: none;
    }
}

@media (max-width: 1159px) {
    .mobile-menu-button {
        display: block;
    }
    
    .hero-section {
        min-height: auto;
        align-items: flex-start;
        justify-content: center;
        padding: 1.5rem 0 0.5rem;
    }
    .hero-content {
        padding: 0 0.5rem;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.game-container {
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: inline-block;
}

.game-frame {
    max-width: 100%;
    border-radius: 8px;
    border: none;
    position: relative;
    z-index: 1;
}

/* Fullscreen Button */
.fullscreen-button {
    display: flex;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1.125rem;
    cursor: pointer;
    margin: 1rem auto 0;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    transition: background-color 0.3s ease;
}

.fullscreen-button:hover {
    background: rgba(220, 38, 38, 0.9);
}

.fullscreen-icon {
    width: 16px;
    height: 16px;
}

/* Section Titles */
.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: bold;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--foreground);
}

/* About Section */
.about-section {
    padding: 5rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-text h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-align: left;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .about-text h2 {
        white-space: normal;
        font-size: clamp(2rem, 8vw, 2.5rem);
        line-height: 1.2;
    }
}

.text-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--card-foreground);
}

.about-image {
    display: flex;
    justify-content: center;
}

.tile-showcase {
    padding: 1.5rem;
    max-width: 20rem;
}

.tile-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--tile-shadow);
}

.tile-caption {
    text-align: center;
    margin-top: 1rem;
    color: var(--card-foreground);
    font-weight: 500;
}

/* How to Play Section */
.how-to-play-section {
    padding: 5rem 0;
    background: transparent;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .steps-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.step-number.red {
    background-color: var(--mahjong-red);
}

.step-number.blue {
    background-color: var(--mahjong-blue);
}

.step-number.green {
    background-color: var(--mahjong-green);
}

.step-number.gold {
    background-color: var(--mahjong-gold);
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: hsl(0, 0%, 30%);
}

.step-card p {
    color: hsl(0, 0%, 30%);
    line-height: 1.6;
}

/* Tile Types Styles */
.tile-types-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.tile-types-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .tile-types-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tile-type {
    text-align: center;
}

.tile-images {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tile-example {
    width: 6rem;
    height: 8rem;
    object-fit: contain;
}

.tile-example-single {
    width: 100%;
    max-width: 24rem;
    height: 16rem;
    object-fit: contain;
}

.tile-type h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.tile-type p {
    color: hsl(0, 0%, 30%);
}

/* Tips Section Styles */
.tips-section {
    padding: 5rem 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 1024px) {
    .tips-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tip-category {
    text-align: center;
    padding: 2rem;
}

.tip-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.tip-title.primary {
    color: var(--primary);
}

.tip-title.secondary {
    color: var(--secondary);
}

.tip-title.accent {
    color: var(--accent);
}

.tip-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.tip-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    color: hsl(0, 0%, 30%);
    line-height: 1.6;
}

.tip-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.75rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.tip-bullet.primary {
    background-color: var(--primary);
}

.tip-bullet.secondary {
    background-color: var(--secondary);
}

.tip-bullet.accent {
    background-color: var(--accent);
}

.golden-rules {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.golden-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.golden-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .golden-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.golden-rule {
    padding: 1.5rem;
}

.golden-rule h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.golden-rule p {
    color: hsl(0, 0%, 30%);
}

/* News Section Styles */
.news-section {
    padding: 5rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-card {
    text-align: center;
    padding: 2rem;
}

.news-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-title.primary {
    color: var(--primary);
}

.news-title.secondary {
    color: var(--secondary);
}

.news-title.accent {
    color: var(--accent);
}

.news-description {
    color: hsl(0, 0%, 30%);
    line-height: 1.6;
}

/* Footer Styles */
.footer {
    padding: 3rem 0;
}

.footer-content {
    padding: 2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-single-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-logo-section {
    margin-bottom: 0;
}

.footer-logo {
    height: 4rem;
}

.footer-description {
    max-width: 600px;
    margin-bottom: 0;
}

.footer-description p {
    color: inherit;
    line-height: 1.6;
}

.footer-contact {
    margin-top: 1rem;
}

.footer-contact h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--primary);
}

.contact-details {
    color: inherit;
}

.contact-details p {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: rgba(255, 255, 255, 0.6);
}