/* ==========================================================================
   Base Styles and Variables
   ========================================================================== */

/* Hero Section Base Styles */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4vw 2vw;
    background-size: contain;
    background-position: right;
    background-repeat: repeat;
    margin-bottom: 2vw;
    position: relative;
    overflow: hidden;
    animation: backgroundTravel 15s infinite alternate ease-in-out;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* For screens wider than 768px (not mobile) */
@media (min-width: 768px) {
    .hero-section {
        background-size: cover;
        background-position: right;
        background-repeat: no-repeat;
    }
}

/* Welcome Main Styles */
.welcome-main {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1;
    position: relative;
}

.welcome-main h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px #000;
}

.welcome-main p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px #000;
}

/* Video Background Styles */
.video-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    /* Fallback background color for browsers that block images */
    background-color: #1a1a1a;
    /* Ensure the background image loads properly */
    background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), url('/images/retrochess2.jpg');
    background-size: 115%;
    background-position: left center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    animation: backgroundTravel 30s infinite alternate ease-in-out;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: -1;
}

@keyframes backgroundTravel {
    0% {
        transform: scale(1.05) translate(0, 0);
    }
    100% {
        transform: scale(1.05) translate(-2%, -2%);
    }
}

/* Prevent mobile zoom and viewport issues */
html, body {
    touch-action: manipulation !important; /* Prevent zoom gestures */
    -webkit-touch-callout: none !important; /* Prevent callout on iOS */
    -webkit-user-select: none !important; /* Prevent text selection */
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
}

/* Hide scroll indicator on mobile */
@media (max-width: 768px) {
    .scroll-indicator {
        display: none !important;
    }
    
    /* Increase height of create new game popup on mobile */
    .game-creation-popup {
        height: auto !important;
        min-height: 60vh !important; /* Increased from default */
        max-height: 80vh !important; /* Allow more height */
    }
    
    .game-creation-popup .popup-content {
        min-height: 55vh !important; /* Ensure content area has more height */
    }
    
    /* Brave browser specific fixes for game creation popup modal */
    .game-creation-popup {
        max-height: 85vh !important; /* Reduce height to ensure button is visible */
        overflow-y: auto !important; /* Allow scrolling if content is too tall */
        padding-bottom: 20px !important; /* Ensure space at bottom for button */
    }
    
    .game-creation-popup .popup-content {
        max-height: 80vh !important; /* Ensure content doesn't exceed viewport */
        overflow-y: auto !important; /* Allow scrolling within content */
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 0 !important; /* Remove bottom padding to prevent overlap */
    }
    
    /* Ensure the button container is always visible at bottom */
    .game-creation-popup .create-button-container {
        position: sticky !important; /* Stick to bottom of scrollable area */
        bottom: 0 !important;
        background: linear-gradient(135deg, rgb(30, 29, 31), rgba(30, 29, 31)) !important; /* Match modal background */
        padding: 16px 20px !important;
        margin-top: auto !important;
        flex-shrink: 0 !important;
        border-top: 1px solid rgba(107, 70, 193, 0.2) !important;
        z-index: 10 !important;
    }
    
    .game-creation-popup .btn-create {
        width: 100% !important;
        min-height: 48px !important;
        padding: 14px 20px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        background: linear-gradient(135deg, #6b46c1, #553c9a) !important;
        color: white !important;
        border: none !important;
        border-radius: 12px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3) !important;
        transition: all 0.3s ease !important;
    }
    
    .game-creation-popup .btn-create:hover {
        background: linear-gradient(135deg, #553c9a, #44337a) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(107, 70, 193, 0.4) !important;
    }
    
    .game-creation-popup .btn-create:disabled {
        background: #666 !important;
        cursor: not-allowed !important;
        transform: none !important;
        box-shadow: none !important;
        opacity: 0.6 !important;
    }
    
    /* Fix game results table alignment on mobile */
    .game-row,
    .game-row-header {
        grid-template-columns: 1fr 80px 60px !important; /* Adjusted column widths for mobile */
        column-gap: 16px !important; /* Reduced gap for mobile */
        padding: 0.8rem 0.5rem !important; /* Adjusted padding for mobile */
        min-height: 50px !important; /* Increased minimum height for better alignment */
        align-items: flex-start !important; /* Align to top for better text wrapping */
    }
    
    /* Ensure result and moves columns stay aligned */
    .game-row > div:nth-child(2), /* Result column */
    .game-row > div:nth-child(3), /* Moves column */
    .game-row-header > div:nth-child(2),
    .game-row-header > div:nth-child(3) {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 40px !important; /* Fixed height for consistent alignment */
        text-align: center !important;
    }
    
    /* Players column - force text wrapping and prevent horizontal expansion */
    .game-row > div:first-child,
    .game-row-header > div:first-child {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important;
        min-height: 40px !important;
        line-height: 1.2 !important;
        max-width: 100% !important; /* Prevent horizontal expansion */
        overflow-wrap: break-word !important; /* Force word breaking */
        word-wrap: break-word !important; /* Legacy word wrap */
        word-break: break-word !important; /* Break long words */
        hyphens: auto !important; /* Add hyphens for better wrapping */
        white-space: normal !important; /* Allow text to wrap */
        width: 100% !important; /* Use full available width */
        box-sizing: border-box !important; /* Include padding in width calculation */
    }
    
    /* Force all text inside players column to wrap */
    .game-row > div:first-child *,
    .game-row-header > div:first-child * {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
        display: block !important; /* Make each element a block for better wrapping */
    }
}

/* Mobile responsive styles for welcome-main */
@media (max-width: 768px) {
    .video-bg-container {
        background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('/images/retrochess2.jpg') !important;
        background-size: cover !important; /* Use cover for better mobile display */
        background-position: center !important; /* Center the image */
        background-repeat: no-repeat !important;
        background-attachment: scroll !important; /* Allow normal scrolling */
        position: absolute !important; /* Absolute position for normal behavior */
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important; /* Fixed viewport height - never changes */
        max-height: 100vh !important; /* Maximum height constraint */
        min-height: 100vh !important; /* Minimum height constraint */
        z-index: -2 !important;
        /* Remove overflow: hidden to allow scrolling */
        /* Prevent zoom and touch interactions */
        touch-action: none !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
    }
    
    .welcome-main {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        height: 100vh !important; /* Fixed height - never changes */
        max-height: 100vh !important; /* Maximum height constraint */
        min-height: 100vh !important; /* Minimum height constraint */
        /* Remove overflow: hidden to allow scrolling */
        position: relative !important; /* Ensure proper positioning */
        /* Prevent mobile viewport changes */
        transform: translateZ(0) !important; /* Force hardware acceleration */
        -webkit-transform: translateZ(0) !important;
        will-change: auto !important; /* Prevent layout shifts */
    }
    
    /* Fix spacing issues between logo and text */
    .welcome-icon {
        margin-top: 0 !important; /* Remove top margin */
        margin-bottom: 0.5rem !important; /* Fixed bottom margin */
        transform: translateZ(0) !important; /* Force hardware acceleration */
        -webkit-transform: translateZ(0) !important;
    }
    
    .welcome-main h1 {
        margin-top: 0 !important; /* Remove top margin */
        margin-bottom: 0.5rem !important; /* Fixed bottom margin */
        transform: translateZ(0) !important; /* Force hardware acceleration */
        -webkit-transform: translateZ(0) !important;
    }
    
    .hero-section {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Force background image to show on mobile */
    .home-container {
        background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('/images/retrochess2.jpg') !important;
        background-size: cover !important; /* Use cover for better mobile display */
        background-position: center !important; /* Center the image */
        background-repeat: no-repeat !important;
        background-attachment: scroll !important;
        min-height: 100vh !important;
    }
    
    /* Additional fallback for the first section */
    .welcome-main {
        background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('/images/retrochess2.jpg') !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        background-attachment: scroll !important;
    }
    
    /* Chrome mobile specific positioning */
    @supports (-webkit-appearance: none) and (not (-moz-appearance: none)) {
        .welcome-main {
            padding-top: 2rem !important; /* Move content higher in Chrome */
        }
        
        .welcome-icon {
            margin-top: 1rem !important; /* Move logo higher in Chrome */
            margin-bottom: 1rem !important; /* Reduce space below logo */
        }
        
        .welcome-main h1 {
            margin-top: 0.5rem !important; /* Move text higher in Chrome */
            margin-bottom: 0.5rem !important; /* Reduce space below text */
        }
        
        .cta-btn {
            margin-top: 1rem !important; /* Move button higher in Chrome */
        }
    }
}

/* Additional mobile fix for very small screens */
@media (max-width: 480px) {
    .video-bg-container {
        background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('/images/retrochess2.jpg') !important;
        background-size: cover !important; /* Use cover for better mobile display */
        background-position: center !important; /* Center the image */
        background-repeat: no-repeat !important;
        height: 100vh !important; /* Fixed viewport height - never changes */
        max-height: 100vh !important; /* Maximum height constraint */
        min-height: 100vh !important; /* Minimum height constraint */
        /* Remove overflow: hidden to allow scrolling */
        /* Prevent zoom and touch interactions */
        touch-action: none !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
    }
    
    .home-container {
        background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('/images/retrochess2.jpg') !important;
        background-size: cover !important; /* Use cover for better mobile display */
        background-position: center !important; /* Center the image */
        background-repeat: no-repeat !important;
        background-attachment: scroll !important;
        height: 100vh !important; /* Fixed viewport height - never changes */
        max-height: 100vh !important; /* Maximum height constraint */
        min-height: 100vh !important; /* Minimum height constraint */
        /* Remove overflow: hidden to allow scrolling */
    }
    
    .welcome-main {
        background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('/images/retrochess2.jpg') !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        background-attachment: scroll !important;
        height: 100vh !important; /* Fixed viewport height - never changes */
        max-height: 100vh !important; /* Maximum height constraint */
        min-height: 100vh !important; /* Minimum height constraint */
        /* Remove overflow: hidden to allow scrolling */
    }
    
    /* Chrome mobile specific positioning for small screens */
    @supports (-webkit-appearance: none) and (not (-moz-appearance: none)) {
        .welcome-main {
            padding-top: 1.5rem !important; /* Move content higher in Chrome on small screens */
        }
        
        .welcome-icon {
            margin-top: 0.5rem !important; /* Move logo higher in Chrome */
            margin-bottom: 0.5rem !important; /* Reduce space below logo */
        }
        
        .welcome-main h1 {
            margin-top: 0.3rem !important; /* Move text higher in Chrome */
            margin-bottom: 0.3rem !important; /* Reduce space below text */
        }
        
        .cta-btn {
            margin-top: 0.8rem !important; /* Move button higher in Chrome */
        }
    }

    
    .welcome-main h1 {
        font-size: 1.5rem;
    }
    
    .welcome-main p {
        font-size: 1.3rem;
    }
    
    .welcome-icon {
        width: 280px;
        height: 280px;
        margin-bottom: 0.7rem;
        margin-top: 3rem;
    }
}

@media (min-width: 769px) {
    .welcome-icon {
        width: 350px;
        height: 350px;
        background-size: contain;
        margin-bottom: 1.2rem;
        margin-top: 5rem;
    }
    
    .main-content h1, main h1, .authenticated-hero .hero-content h1 {
        font-size: 3.2rem;
    }
    
    .quote-text, .welcome-quote {
        font-size: 1.5rem;
    }
    
    .authenticated-hero .welcome-quote, .authenticated-hero .quote-text {
        font-size: 2.1rem;
    }

    /* Desktop header logo and menu button styles with transition */
    .header .logo,
    .header .menu-btn {
        transition: color 0.3s ease; /* Smooth transition for color changes */
    }

    /* Black header text when first section is not visible - Desktop and Light Mode only */
    [data-theme="light"] .header.first-section-hidden .logo {
        color: #000 !important; /* Black text when first section is not visible in light mode */
        text-shadow: none; /* Remove text shadow for better black text visibility */
    }

    /* Black burger menu icon when first section is not visible - Desktop and Light Mode only */
    [data-theme="light"] .header.first-section-hidden .menu-btn {
        color: #000 !important; /* Black burger menu icon when first section is not visible in light mode */
    }
}

/* ==========================================================================
   Hero Section Components
   ========================================================================== */

.integrated-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

/* Hero Background with Diagonal Sections */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Active state for background sections */
.bg-section {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.5s ease;
    opacity: 0; /* Hide by default */
    transform: scale(1);
    filter: blur(1px) brightness(0.7);
    visibility: hidden; /* Added to completely hide the sections */
}

/* Diagonal sections with clip-path */
.bg-section-1 {
    left: 0;
    width: 100%; /* Changed from 33.33% to 100% to take full width */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1; /* Make visible by default */
    visibility: visible; /* Make visible by default */
    z-index: 1; /* Ensure it's always on top */
    filter: blur(0) brightness(1); /* No blur, full brightness */
    transform: scale(1.1); /* Slightly larger scale */
    box-shadow: 0 0 30px rgba(130, 90, 220, 0.4); /* Lighter purple glow */
    position: relative;
    height: 100%;
}

/* Background image containers */
.bg-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Enhanced animation for background images */
.bg-image {
    width: 18vw;
    min-width: 5em;
    max-width: 12em;
    height: auto;
    object-fit: contain;
    transform-origin: center;
    transition: all 0.5s ease;
}

/* Specific styling for chess piece images */
.bg-section-1 .bg-image {
    max-width: 35%;    /* Reduced from 50% to 35% */
    max-height: 35%;   /* Reduced from 50% to 35% */
    margin-top: -25%;
    margin-left: -30.5%;
    animation: none;
}

@keyframes slowPan {
    0% {
        transform: scale(1.1) translate(0, 0);
    }
    100% {
        transform: scale(1.1) translate(5%, 5%);
    }
}

/* Active state for background sections */
.bg-section.active {
    opacity: 1; /* Increase opacity when corresponding card is focused */
    transform: scale(1.1);
    filter: blur(0) brightness(1); /* No blur when active */
    z-index: 1; /* Ensure active section appears above others */
    box-shadow: 0 0 30px rgba(130, 90, 220, 0.4); /* Lighter purple glow */
    visibility: visible; /* Make visible when active */
}

.integrated-hero .hero-content {
    margin-bottom: 2rem;
    position: relative;
    z-index: 2; /* Ensure content appears above background */
    padding-top: 0; /* Remove top padding */
    max-width: 600px; /* Prevents hero content from stretching too wide */
    width: 100%;
}

.hero-content h1 {
    font-size: 3.5rem; /* Increased from 2.5rem to 3.5rem for bigger welcome text */
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content p {
    font-size: 1.5rem; /* Increased from 1rem to 1.5rem for bigger description text */
    color: var(--text-secondary);
    max-width: 700px; /* Increased from 600px to 700px to accommodate larger text */
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.main-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 2vw;
    justify-content: center;
    align-items: center;
    margin-top: 20vw !important;
    margin-bottom: 0vw;
    padding: 0 2vw;
}

.main-button {
    padding: 15px 30px;
    font-family:  'NXBaskerville', serif !important;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 180px;
    text-align: center;
}

.main-button.get-started {
    background:  #232526 10%;
    color: #fffbf7;
    font-weight: 600;
    border: 2px solid #333; border-radius: 4px;
    /* box-shadow: 0 2px 12px 0 rgba(108,99,255,0.13); */
    transition: background 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s, color 0.2s; 
    z-index: 3000;
    border-radius: 0.1rem;
}

.main-button.get-started:hover {
    background: #333; /* Slightly lighter or darker than the original */
    color: #fff;      /* Keep text white for contrast */
    box-shadow: 0 2px 8px rgba(0,0,0,0.10); /* Subtle shadow for lift */
}

.main-button.about {
    background: #232526 10%;
    color: #fffbf7;
    font-weight: 600;
    border: 2px solid #333; border-radius: 4px;
    /* box-shadow: 0 2px 12px 0 rgba(108,99,255,0.13); */
    transition: background 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s, color 0.2s;
    z-index: 3000;
    border-radius: 0.1rem;
}
    
.main-button.about:hover {
    background: #333; /* Slightly lighter or darker than the original */
    color: #fff;      /* Keep text white for contrast */
    box-shadow: 0 2px 8px rgba(0,0,0,0.10); /* Subtle shadow for lift */
}

.dual-morph-btn {
    display: inline-flex;
    position: relative;
    border-radius: 2em;
    overflow: hidden;
    background: #55610a;
    transition: background 0.2s;
    min-width: 240px;
    height: 56px;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.12);
    cursor: pointer;
}

.dual-morph-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    font-weight: 600;
    color: #fff;
    background: transparent;
}
.dual-morph-content.default {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    gap: 0.6em;
}

.dual-morph-content.default i {
    font-size: 1.2em;
}

.dual-morph-content.dual {
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}
.dual-morph-btn:hover .dual-morph-content.default,
.dual-morph-btn:focus-within .dual-morph-content.default {
    opacity: 0;
    pointer-events: none;
}
.dual-morph-btn:hover .dual-morph-content.dual,
.dual-morph-btn:focus-within .dual-morph-content.dual {
    opacity: 1;
    pointer-events: auto;
}
.dual-morph-content.dual {
    flex-direction: row;
    gap: 0;
}
.dual-morph-content.default i {
    margin-right: 0.5em;
}

/* Icon side styling for dual morph button */
.icon-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: 0.5em;
}

.icon-side:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon-side.left {
    border-radius: 2em 0 0 2em;
}

.icon-side.right {
    border-radius: 0 2em 2em 0;
    border-left: 2px solid rgba(255, 255, 255, 0.3); /* Separator line */
}

.icon-side i {
    font-size: 1.5em;
    margin-bottom: 0.2em;
    transition: transform 0.2s ease;
}

.icon-side:hover i {
    transform: scale(1.1);
}

.icon-side .icon-text {
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
}

.white-icon {
    color: #ffffff;
}

.black-icon {
    color: #ffffff;
}

/* ==========================================================================
   Game Grid and Board Styles
   ========================================================================== */

.all-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-bottom: 2rem; /* Add padding at the bottom for better scrolling */
}

/* ==========================================================================
   Chess Board Preview Styles
   ========================================================================== */

.board-preview {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Add rotation for black's perspective */
.board-grid.black-perspective {
    transform: rotate(180deg);
}

/* Rotate pieces back when board is rotated */
.board-grid.black-perspective .piece {
    transform: rotate(180deg);
}

.square {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chess-board-preview.brown .square.light { background-color: #ab9b87; }
.chess-board-preview.brown .square.dark  { background-color: #71645a; }

/* Purple theme */
.chess-board-preview.purple .square.light { background-color: #9d74c4; }
.chess-board-preview.purple .square.dark  { background-color: #4b286b; }

/* Gold theme */
.chess-board-preview.gold .square.light { background-color: #f0d9b5; }
.chess-board-preview.gold .square.dark  { background-color: #b58863; }

.piece {
    width: 80%;
    height: 80%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ==========================================================================
   Popup and Modal Styles
   ========================================================================== */

.share-game-popup,
.join-game-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    height: auto;
    min-height: 400px;
    max-height: 80vh;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-game-popup::before,
.join-game-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.6);
    z-index: -1;
}

.share-game-popup::after,
.join-game-popup::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.share-game-popup.show,
.join-game-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Popup Components */
.popup-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80px;
}

.popup-header-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin: 0;
}

.popup-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.popup-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.popup-body {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

/* Invitations Section */
.invitations-section {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.invitations-section h3 {
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
}

.invitations-container {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm);
}

.invitation-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    transition: all 0.2s ease;
}

.invitation-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.invitation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.inviter-name {
    color: var(--primary-light);
    font-weight: 600;
    font-size: 1rem;
}

.invitation-time {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.invitation-details {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.invitation-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-accept,
.btn-decline {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.9rem;
}

.btn-accept {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-accept:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
}

.btn-decline {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.btn-decline:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: translateY(-1px);
}

/* Loading and Error States */
.loading,
.error {
    text-align: center;
    padding: var(--spacing-md);
    color: var(--text-secondary);
}

.loading {
    font-style: italic;
}

.error {
    color: #f44336;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .share-game-popup,
    .join-game-popup {
        /* Fix centering and sizing for mobile */
        width: 95vw;
        max-width: 95vw; /* Ensure it doesn't exceed viewport width */
        max-height: 85dvh; /* Use dynamic viewport height for better mobile keyboard handling */
        margin: 0; /* Remove margin that was causing centering issues */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.95); /* Slightly smaller scale for mobile */
        border-radius: 12px; /* Smaller border radius for mobile */
        overflow: hidden; /* Prevent content from spilling out */
        position: fixed;
        min-height: auto; /* Remove fixed min-height for mobile */
    }
    
    .share-game-popup.show,
    .join-game-popup.active {
        transform: translate(-50%, -50%) scale(1);
    }
    
    /* Improve popup header for mobile */
    .popup-header {
        padding: 16px 20px 12px 20px; /* Reduce padding for mobile */
        min-height: 60px; /* Reduce minimum height */
        flex-shrink: 0; /* Prevent header from shrinking */
    }
    
    .popup-header-logo {
        height: 40px; /* Smaller logo for mobile */
        width: auto;
    }
    
    .popup-header .close-btn {
        font-size: 1.2rem; /* Smaller close button */
        padding: 6px; /* Reduce padding */
        min-height: 44px; /* Ensure minimum touch target size */
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve popup body for mobile */
    .popup-body {
        padding: 16px 20px; /* Reduce padding for mobile */
        gap: 12px; /* Reduce gap between elements */
        flex: 1;
        overflow-y: auto; /* Enable scrolling within the popup body */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        max-height: calc(85dvh - 80px); /* Account for header height */
    }
    
    /* Improve invitations section for mobile */
    .invitations-section {
        margin-bottom: 12px; /* Reduce margin */
    }
    
    .invitations-section h3 {
        font-size: 1.2rem; /* Smaller font size for mobile */
        margin-bottom: 12px; /* Reduce margin */
    }
    
    .invitations-container {
        max-height: 250px; /* Limit height for mobile */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        padding: 12px; /* Reduce padding */
        border-radius: 8px; /* Smaller border radius */
    }
    
    /* Improve invitation items for mobile */
    .invitation-item {
        padding: 12px; /* Reduce padding */
        margin-bottom: 8px; /* Reduce margin */
        border-radius: 8px; /* Smaller border radius */
    }
    
    .invitation-header {
        margin-bottom: 6px; /* Reduce margin */
    }
    
    .inviter-name {
        font-size: 0.95rem; /* Smaller font size */
    }
    
    .invitation-time {
        padding: 3px 6px; /* Reduce padding */
        font-size: 0.75rem; /* Smaller font size */
    }
    
    .invitation-details {
        margin-bottom: 8px; /* Reduce margin */
        font-size: 0.85rem; /* Smaller font size */
    }
    
    /* Improve invitation actions for mobile */
    .invitation-actions {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 8px; /* Reduce gap */
    }
    
    .btn-accept,
    .btn-decline {
        padding: 12px 16px; /* Increase padding for better touch targets */
        font-size: 0.9rem; /* Smaller font size */
        min-height: 44px; /* Ensure minimum touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px; /* Reduce gap between icon and text */
    }
    
    /* Adjust for very small viewport heights (when keyboard is open) */
    @media (max-height: 500px) {
        .share-game-popup,
        .join-game-popup {
            max-height: 90dvh;
            top: 5dvh;
            transform: translate(-50%, 0) scale(0.95);
        }
        
        .share-game-popup.show,
        .join-game-popup.active {
            transform: translate(-50%, 0) scale(1);
        }
        
        .popup-body {
            max-height: calc(90dvh - 60px);
            padding: 12px 16px;
            gap: 8px;
        }
        
        .popup-header {
            padding: 8px 16px 6px 16px;
        }
        
        .invitations-container {
            max-height: 200px;
        }
    }
}

/* Additional fixes for very small screens */
@media (max-width: 480px) {
    .share-game-popup,
    .join-game-popup {
        width: 98vw; /* Use almost full width on very small screens */
        max-height: 80dvh; /* Further reduce height */
        border-radius: 8px;
    }
    
    .popup-header {
        padding: 12px 16px 8px 16px;
        min-height: 50px;
    }
    
    .popup-header-logo {
        height: 35px; /* Even smaller logo */
    }
    
    .popup-header .close-btn {
        font-size: 1.1rem;
        padding: 4px;
    }
    
    .popup-body {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .invitations-section h3 {
        font-size: 1.1rem;
    }
    
    .invitations-container {
        padding: 10px;
        max-height: 220px;
    }
    
    .invitation-item {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .inviter-name {
        font-size: 0.9rem;
    }
    
    .invitation-details {
        font-size: 0.8rem;
    }
    
    .btn-accept,
    .btn-decline {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

/* Fix for landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .share-game-popup,
    .join-game-popup {
        max-height: 75vh; /* Reduce height further in landscape */
    }
    
    .popup-body {
        max-height: calc(75vh - 60px);
    }
    
    .invitations-container {
        max-height: 180px;
    }
}

/* ==========================================================================
   Utility Classes and Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Enhanced animation keyframes */
@keyframes enhancedPan {
    0% {
        transform: scale(1.1) translate(0, 0) rotate(0deg);
    }
    50% {
        transform: scale(1.15) translate(2%, 2%) rotate(1deg);
    }
    100% {
        transform: scale(1.1) translate(5%, 5%) rotate(0deg);
    }
}

@keyframes backgroundTravel {
    from {
        background-position: left center;
    }
    to {
        background-position: right center;
    }
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

@media (max-width: 992px) {
    
    .integrated-hero {
        min-height: auto;
        padding-bottom: 3rem;
    }
    
    /* Adjust background sections for 2-column layout */
    .bg-section-1 {
        width: 100%; /* Keep full width on medium screens */
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2vw 1vw;
        background-position: top center;
    }

    .integrated-hero {
        padding: 1.5rem 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }
    
    /* Adjust background sections for 1-column layout */
    .bg-section-1 {
        width: 100%;
        left: 0;
        height: 100%;
        clip-path: none;
    }
}

/* Full viewport background for authenticated users */
body.authenticated {
    position: relative;
    overflow-x: hidden;
    min-height: 100vh; /* Ensure body takes full viewport height */
}

body.authenticated .welcome-icon {
    margin-top: 1rem !important;   /* Move logo even further up */
    margin-bottom: 1rem !important; /* Reduce bottom margin to move content up */
}

@media (min-width: 769px) {
    .welcome-icon {
        margin-top: 4rem !important; 
    }
    
    #motolang {
        margin-top: 3.5rem !important;
        font-family: Open Sans, sans-serif;
    }
    
    body.authenticated .username-row {
        margin-top: 0rem !important; /* Ensure no extra top margin on the h1 */
        font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif, sans-serif !important;
        font-size: 2rem !important; /* Reduced from 2.5rem to 2rem for smaller welcome text */
        margin-bottom: 0.5rem !important; /* Reduce bottom margin to move chess quote up */
        /* Allow username to wrap to multiple lines when too long */
        word-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        line-height: 1.2;
        max-width: 90vw; /* Prevent overflow on small screens */
    }

    body.authenticated .welcome-icon {
        margin-top: -5rem !important;
    }
}

@media (max-width: 768px) {
    body.authenticated .welcome-icon {
        width: 100px;
        height: 100px;
    }

    #motolang {
        margin-top: 3rem !important;
        font-size: 2.2rem !important;
    }
    body.authenticated .welcome-icon {
        margin-top: -6.5rem !important;
        margin-bottom: 0.5rem !important; /* Reduce bottom margin to move content up */
    }
}

@media (max-width: 768px) {
    body.authenticated .scroll-indicator {
        bottom: 6.8rem !important;
    }
}


body.authenticated::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('/images/retrochess2.jpg');
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: -1;
    animation: slowPan 30s infinite alternate ease-in-out;
}

/* Authenticated Hero Section */
.authenticated-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    background: transparent;
}


/* Remove the background from authenticated hero */
.auth-hero-background {
    display: none; /* Hide the background container */
}

/* Ensure content is visible over the background */
.authenticated-hero .hero-content{
    position: relative;
    z-index: 2;
}

/* Add a subtle overlay to improve text readability */
.authenticated-hero .hero-content {
    background: transparent;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem; /* Reduced from 4rem to 2rem to move content higher */
}

/* Make welcome message smaller for authenticated users */
.authenticated-hero .hero-content h1 {
    font-size: 2.5rem; /* Reduced from 3rem to 2.5rem for smaller welcome text */
    margin-bottom: 0.5rem; /* Reduced margin to move chess quote up */
    background: linear-gradient(45deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: white;
    text-shadow: 0 0 30px rgba(130, 90, 220, 0.3);
    padding: 0.5rem 1rem;
    background-color: rgba(28, 20, 20, 0.93); /* Fully opaque black background */
    border-radius: 0; /* Remove rounded corners */
    display: inline-block;
    width: auto; /* Allow width to be determined by content */
    text-align: center; /* Center the text */
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Chess quote specific styling - ensure it's always visible */
#chessquote {
    opacity: 1 !important; /* Ensure visibility */
    display: block !important; /* Ensure display */
    visibility: visible !important; /* Ensure visibility */
    color: #b8b3b3 !important; /* Ensure text color */
    -webkit-text-fill-color: #fff !important; /* Ensure text color on webkit browsers */
    font-style: italic;
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Mobile responsive styles for welcome username */
@media (max-width: 768px) {
    .authenticated-hero .hero-content h1 {
        font-size: 2rem; /* Much smaller on tablets */
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    /* Mobile chess quote spacing */
    #chessquote {
        margin-top: 0.5rem !important; /* Move chess quote much closer to welcome text */
        margin-bottom: 1rem !important; /* Reduced space below on tablets */
        font-size: 1.5rem !important; /* Smaller font on tablets */
        opacity: 1 !important; /* Ensure visibility */
        display: block !important; /* Ensure display */
        visibility: visible !important; /* Ensure visibility */
    }
}

@media (max-width: 480px) {
    .authenticated-hero .hero-content h1 {
        font-size: 1.5rem; /* Even smaller on mobile phones */
        padding: 0.3rem 0.6rem;
        margin-bottom: 0.6rem;
    }
    
    /* Small mobile chess quote spacing */
    #chessquote {
        margin-top: 0.3rem !important; /* Move chess quote much closer to welcome text on mobile */
        margin-bottom: 0.8rem !important; /* Further reduced space below on mobile */
        font-size: 1.2rem !important; /* Smaller font on mobile */
        opacity: 1 !important; /* Ensure visibility */
        display: block !important; /* Ensure display */
        visibility: visible !important; /* Ensure visibility */
    }
}

@media (max-width: 360px) {
    .authenticated-hero .hero-content h1 {
        font-size: 1.2rem; /* Very small on very small screens */
        padding: 0.2rem 0.5rem;
        margin-bottom: 0.5rem;
    }
}

.authenticated-hero .hero-content p {
    font-size: 1.3rem; /* Reduced from 1.5rem to 1.3rem */
    color: var(--text-secondary);
    margin-bottom: 2rem;
    /* text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); - REMOVED */
    padding: 0.5rem 1rem;
    display: block; /* Change from inline-block to block */
    width: auto; /* Allow width to be determined by content */
    text-align: center; /* Center the text */
}

/* Mobile responsive styles for welcome description */
@media (max-width: 768px) {
    .authenticated-hero .hero-content p {
        font-size: 1rem; /* Smaller on tablets */
        padding: 0.4rem 0.8rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .authenticated-hero .hero-content p {
        font-size: 0.9rem; /* Even smaller on mobile phones */
        padding: 0.3rem 0.6rem;
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 360px) {
    .authenticated-hero .hero-content p {
        font-size: 0.8rem; /* Very small on very small screens */
        padding: 0.2rem 0.5rem;
        margin-bottom: 1rem;
    }
}

/* Welcome Quote Styles */
.welcome-quote {
    font-size: 1.5vw;
    color: #bfc9d1;
    text-align: center;
    margin-top: 1vw;
    max-width: 80vw;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.quote-mark {
    font-size: 2em;
    color: rgba(255,255,255,0.3);
}

.quote-text {
    font-size: 1.2em;
    padding: 0 2vw;
}

/* Mobile-specific spacing for skgweb logo and welcome quote */
@media (max-width: 768px) {
    /* Add proper spacing below skgweb logo on mobile */
    .welcome-icon div[style*="margin-top: 20px"] {
        margin-bottom: 1.5rem !important; /* Add bottom margin for proper gap */
    }
    
    /* Alternative selector for skgweb logo container */
    .welcome-icon > div:has(.skgweb-logo) {
        margin-bottom: 1.5rem !important; /* Add bottom margin for proper gap */
    }
    
    /* Adjust welcome quote spacing on mobile */
    .welcome-quote {
        margin: 1rem 0; /* Increase margin for better spacing */
        font-size: 0.9rem;
        padding: 0 1rem;
    }
}

@media (max-width: 600px) {
    /* Even more spacing for very small screens */
    .welcome-icon div[style*="margin-top: 20px"] {
        margin-bottom: 2rem !important; /* Increase bottom margin for very small screens */
    }
    
    /* Alternative selector for skgweb logo container */
    .welcome-icon > div:has(.skgweb-logo) {
        margin-bottom: 2rem !important; /* Increase bottom margin for very small screens */
    }
    
    .welcome-quote {
        margin: 1.5rem 0; /* Increase margin for very small screens */
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    /* Maximum spacing for extra small screens */
    .welcome-icon div[style*="margin-top: 20px"] {
        margin-bottom: 2.5rem !important; /* Maximum bottom margin for extra small screens */
    }
    
    /* Alternative selector for skgweb logo container */
    .welcome-icon > div:has(.skgweb-logo) {
        margin-bottom: 2.5rem !important; /* Maximum bottom margin for extra small screens */
    }
    
    .welcome-quote {
        margin: 2rem 0; /* Maximum margin for extra small screens */
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
}

/* Active Games Section Styles */
.all-games-section {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    background: transparent;
    padding: 2rem 2rem;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    z-index: 10;
    border-radius: 0;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.all-games-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.games-two-column {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    justify-content: space-between;
    height: calc(100vh - 160px);
}

.games-right {
    flex: 0 0 35%;
    min-width: 350px;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.games-left {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 63%;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1200px) {
    .all-games-section {
        padding: 1.5rem 0.5rem;
    }
    .games-two-column {
        gap: 1rem;
        padding: 1rem 0.5rem;
    }
    .games-right {
        min-width: 250px;
        flex: 0 0 40%;
    }
    .games-left {
        max-width: 58%;
    }
}

@media (max-width: 900px) {
    /* True flex column for all-games-section and children on mobile */
    .all-games-section {
        display: flex;
        flex-direction: column; /* Stack children vertically */
        align-items: stretch;
        width: 100%;
        height: auto !important;
        min-height: unset !important;
        flex-wrap: nowrap;
    }
    .games-two-column {
        display: flex;
        flex-direction: column; /* Stack children vertically */
        width: 100%;
        gap: 1.2rem;
        padding: 1rem 0.2rem;
        height: auto !important;
        min-height: unset !important;
        flex-wrap: nowrap;
    }
    .games-right, .games-left {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .all-games-section {
        padding: 0.5rem 0.1rem;
    }
    .games-two-column {
        gap: 0.5rem;
        padding: 0.5rem 0.1rem;
    }
    .games-right, .games-left {
        padding: 0.5rem 0.1rem;
        border-radius: 6px;
    }
}

.view-game-link {
    margin-left: 1.2rem;
    background: #553c9a;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    padding: 0.2em 0.6em; /* slightly less horizontal padding */
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    font-size: 0.98em;
    display: inline-block;
}
.view-game-link:hover {
    background: #2d1f2e;
    color: #fff;
    text-decoration: none;
}

/* Alternative: Use JavaScript for more robust support if needed. */

.social-link {
    color: #e0e0e0;
    font-size: 1.5em;
    margin-right: 0.7em;
    transition: color 0.2s;
    text-decoration: none;
}
.social-link:last-child {
    margin-right: 0;
}
.social-link:hover {
    color: #553c9a;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.site-footer a:hover {
    color: #553c9a;
    text-decoration: none;
}

.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}
.clickable-row:hover {
    background: rgba(147, 112, 219, 0.10); /* subtle purple highlight on hover */
}

/* Play menu styles */
.play-menu-container {
    position: relative;
}

.main-button.play {
    background-color: #425007;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(226, 125, 96, 0.3);
}

.main-button.play:hover {
    background-color: #849d14;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 125, 96, 0.4);
}

.play-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 31, 38, 0.95);
    border-radius: 8px;
    padding: 8px;
    margin-top: 8px;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    z-index: 1000;
}

.play-menu.show {
    display: block;
    animation: menuFadeIn 0.2s ease-out;
}

.play-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.play-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.play-menu-item i {
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.section-title {
    color: #e0e0e0;
    font-size: 1.3rem; /* Reduced from 1.1rem to 0.9rem */
    margin-bottom: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 2px solid #d9cbbc;
    font-weight: 600;
    background-color: #585858;
    text-align: center;
}

.section-header {
    margin-bottom: 0.5rem; /* Slightly increased margin */
    line-height: 1.2; /* Slightly increased for better readability */
}

.section-header h2 {
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: 2rem; /* Reduced size for "My Games" text */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2 i {
    font-size: 0.9rem; /* Match icon size with text */
}

/* Update responsive behavior */
@media (max-width: 1400px) {
    .chess-board-preview {
        max-width: 90%;
    }
}

@media (max-width: 1200px) {
    .chess-board-preview {
        max-width: 85%;
    }
}

@media (max-width: 900px) {
    .chess-board-preview {
        max-width: 280px; /* Fixed width for smaller screens */
    }
}

@keyframes enhancedBounceLogo {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-2deg);
    }
}

.history-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.placeholder-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin: 1rem;
}

.placeholder-message i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.placeholder-message p {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 1.1rem;
    max-width: 300px;
    line-height: 1.5;
}

/* Error message styles */
.error-message {
    margin: 0 auto 20px auto;
    max-width: 800px;
    padding: 0 20px;
    position: fixed;
    top: 120px; /* Moved down from 80px to 120px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000000000;
    width: 100%;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Added to position close button */
    gap: 12px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
    animation: slideDown 0.3s ease-out;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.95);
    color: white;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert i {
    font-size: 1.4em;
}

.alert .message-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert .close-error {
    cursor: pointer;
    padding: 5px;
    font-size: 1.2em;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.alert .close-error:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.error-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-popup.show {
    opacity: 1;
}

.error-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    color: #e0e0e0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.error-popup.show .error-content {
    transform: translateY(0);
}

.error-content i {
    font-size: 3em;
    color: #9370DB;
    margin-bottom: 1rem;
}

.error-content h3 {
    color: #e0e0e0;
    font-size: 1.4em;
    margin: 0.5rem 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.error-content p {
    font-size: 1.1em;
    margin: 1rem 0;
    line-height: 1.5;
}

.error-content button {
    background: #9370DB;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.error-content button:hover {
    background: #7B68EE;
    transform: translateY(-2px);
}

.error-content button:active {
    transform: translateY(0);
}

/* Cancel Game Confirmation Popup Styles */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.confirm-dialog.show {
    opacity: 1;
}

.confirm-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    color: #e0e0e0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.15s ease;
}

.confirm-dialog.show .confirm-content {
    transform: translateY(0);
}

.confirm-content h4 {
    color: #e0e0e0;
    font-size: 1.4em;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.confirm-buttons button {
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 120px;
}

.confirm-buttons .btn-yes {
    background: #ff6b6b;
    color: white;
}

.confirm-buttons .btn-no {
    background: #9370DB;
    color: white;
}

.confirm-buttons button:hover {
    transform: translateY(-2px);
    filter: brightness(110%);
}

.confirm-buttons button:active {
    transform: translateY(0);
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.games-two-column {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    justify-content: space-between;
    height: calc(100vh - 160px);
}

.games-right {
    flex: 0 0 35%;
    min-width: 350px;
    order: 1;
    background-color: rgba(0, 0, 0, 0.85);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.games-left {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 63%;
    order: 2;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Game History and List Styles
   ========================================================================== */

.game-rows-list {
    width: 100%;
    max-width: 900px;
    margin: 1.5rem auto 0 auto;
    background: rgba(0,0,0,0.10);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.game-row,
.game-row-header {
    display: grid;
    grid-template-columns: 1fr 110px 100px 220px;
    column-gap: 32px;
    align-items: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    font-size: 0.95rem;
    min-height: 40px;
}

/* Game status styles */
.game-status {
    padding: 0.2rem 0.4rem; /* Reduced padding */
    border-radius: 4px;
    font-size: 0.75rem; /* Reduced from 0.8rem */
    color: #fff; /* Make status text white for all-games list */
}

/* Game result styles */
.game-result {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
}

.game-result i {
    font-size: 0.8rem;
    margin-right: 5px;
}

.status-in-progress {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-completed {
    background-color: rgba(147, 112, 219, 0.2);
    color: #9370DB;
}

/* ==========================================================================
   Social Links and Footer
   ========================================================================== */

.social-link {
    color: #e0e0e0;
    font-size: 1.5em;
    margin-right: 0.7em;
    transition: color 0.2s;
    text-decoration: none;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

/* ==========================================================================
   Welcome Section Styles
   ========================================================================== */

.welcome-quote {
    text-align: center;
    margin: 30px 0;
    color: #fff;
    font-style: italic;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
    flex-wrap: wrap;
}

/* Scroll Indicator for Authenticated Users */
.scroll-indicator {
    position: absolute;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;
    text-align: center;
    width: 100%;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator i {
    font-size: 1.5rem;
}

.scroll-indicator span {
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* Media Queries for Responsive Layout */
@media (max-width: 768px) {
    .welcome-icon {
        width: 150px; /* Smaller size for mobile */
        height: 150px;
        margin-bottom: 1rem;
    }

    .think-chess-text {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        margin: 1rem 0;
        text-align: center;
        align-items: center;
        width: 100%;
    }

    .main-buttons-container {
        flex-direction: column; /* Stack buttons vertically */
        margin-top: 2rem !important; /* Reduce top margin */
        gap: 1rem; /* Reduce gap between buttons */
        padding: 0 1rem;
    }

    .main-button {
        width: 100%; /* Full width buttons */
        max-width: 300px; /* Maximum width for buttons */
    }

    .welcome-quote {
        margin: 1rem 0; /* Increased spacing for better mobile layout */
        font-size: 0.9rem;
        padding: 0 1rem;
    }
}

/* Additional breakpoint for very small screens */
@media (max-width: 480px) {
    .welcome-icon {
        width: 120px;
        height: 120px;
    }

    .think-chess-text {
        font-size: 1.8rem;
    }

    .main-button {
        max-width: 250px;
    }
}

/* Flex column for welcome section */
.welcome-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

@media (max-width: 768px) {
    .welcome-section > * {
        margin-bottom: 1.2rem;
    }
}

/* Row for logo and text */
.welcome-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
    gap: 0.3rem; /* Reduced gap for closer spacing */
}

.welcome-icon {
    width: clamp(90px, 18vw, 350px); /* Responsive: min 90px, max 300px, scales with viewport */
    height: clamp(90px, 18vw, 350px);
    margin: 0;
    min-width: 60px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Add styles for the img element inside welcome-icon */
.welcome-icon img {
    width: 100%; /* Take full width of container */
    height: 100%; /* Take full height of container */
    object-fit: contain; /* Maintain aspect ratio */
    max-width: 100%; /* Ensure it doesn't overflow */
    max-height: 100%; /* Ensure it doesn't overflow */
}

.think-chess-text {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    display: flex;
    align-items: left;
    font-size: clamp(1.5rem, 5vw, 4vw);
    font-weight: 700;
    text-align: left;
    margin: 0;
    background: none;
    width: auto;
    justify-content: flex-start;
    word-break: break-word;
    letter-spacing: -0.02em;
    line-height: 1.2;
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    font-family: 'NXBaskerville', serif;
    flex-direction: column;
}

.think-chess-text .dot {
    color: #553c9a;
    font-size: clamp(1.8rem, 6vw, 4.5vw);
    margin-left: 1vw;
    display: block; /* Force Chess. to new line */
    margin-top: 0.1em; /* Optional: add spacing between lines */
}

@media (max-width: 900px) {
    .welcome-icon {
        width: clamp(70px, 22vw, 180px);
        height: clamp(70px, 22vw, 180px);
    }
    .think-chess-text {
        font-size: clamp(1.2rem, 6vw, 2.5rem);
    }
    .think-chess-text .dot {
        font-size: clamp(1.2rem, 7vw, 2.5rem);
    }
}

@media (max-width: 600px) {
    .welcome-row {
        flex-direction: column;
        gap: 0.1rem; /* Even closer on mobile */
    }
    .welcome-icon {
        width: clamp(60px, 32vw, 120px);
        height: clamp(60px, 32vw, 120px);
    }
    .think-chess-text {
        font-size: clamp(2.2rem, 13vw, 4rem); /* Much bigger on mobile */
        text-align: center;
        justify-content: center;
    }
    .think-chess-text .dot {
        font-size: clamp(2.2rem, 13vw, 4rem); /* Much bigger on mobile */
    }
    .btn-sign-in {
        font-size: 0.95rem;
        padding: 0.5em 1em;
        font-weight: 300;
        width: auto;
        white-space: nowrap;
    }
    .main-button {
        max-width: 180px;
        width: 100%;
        min-width: unset;
        padding-left: 0.5em;
        padding-right: 0.5em;
    }
    .welcome-quote {
        font-size: 0.9rem;      /* or even 0.8rem for extra small */
        padding: 0 0.5rem;
        margin: 1.5rem 0; /* Increased margin for better spacing on very small screens */
    }
    .welcome-quote .quote-text {
        font-size: 1em;         /* Ensures it doesn't get too large */
    }
    .welcome-quote .quote-mark {
        font-size: 1.2em;       /* Adjust quote mark size if needed */
    }
}

.main-buttons-container {
    margin-top: 1.5rem !important;
}

/* Add a title for the section with better contrast */
.all-games-title {
    color: var(--text-color);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Update the game cards to stand out better without a background */
.all-game-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Remove transform from hover effect */
.all-game-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.all-game-header {
    padding: 0.5rem 0.75rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
}

.all-game-header h3 {
    margin: 0;
    font-size: 1rem; /* Reduced from 1.1rem */
    font-weight: 600;
}

.game-status {
    padding: 0.2rem 0.4rem; /* Reduced padding */
    border-radius: 4px;
    font-size: 0.75rem; /* Reduced from 0.8rem */
    color: #fff; /* Make status text white for all-games list */
}

.all-game-board {
    padding: 0.75rem 0.75rem 0.25rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.all-game-board:hover {
    transform: scale(1.02);
    filter: brightness(1.2);
}

.chess-board-preview {
    width: 100%;
    max-width: 75%;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    margin: 0 auto;
    transition: box-shadow 0.3s ease;
    display: block;
    background: transparent;
}

.all-game-board:hover .chess-board-preview {
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.4);
}

.all-game-info {
    padding: 1rem;
    flex-grow: 1;
}

.player-color {
    font-weight: 500;
}

.all-game-actions {
    display: none;
}

.no-all-games {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin: 2rem auto;
    width: 100%;
    max-width: 600px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
}

.no-all-games i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1.5rem;
}

.no-all-games h3 {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: #fff;
}

.no-all-games p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.no-all-games .main-buttons-container.auth-buttons {
    margin-top: 1rem;
    background: none;
    padding: 0;
}

.site-footer {
    position: relative !important;
    width: 100%;
    z-index: 1;
}

/* Login Error Styles */
.login-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f44336;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 4px;
    animation: fadeIn 0.3s ease-in;
}

.login-error i {
    font-size: 1rem;
    color: #f44336;
}

.login-error span {
    flex: 1;
}

/* Login Button Loading State */
.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #6c757d;
}

.login-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Invitation Notification Styles */
.invitation-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.invitation-popup.show {
    opacity: 1;
    transform: translateX(0);
}

/* Enhanced real-time notification styles */
.invitation-popup.real-time {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: 2px solid #8BC34A;
    box-shadow: 0 12px 40px rgba(76, 175, 80, 0.4);
}

.invitation-popup.real-time.attention {
    animation: attentionPulse 1s ease-in-out infinite;
    transform: translateX(0) scale(1.05);
}

@keyframes attentionPulse {
    0%, 100% {
        box-shadow: 0 12px 40px rgba(76, 175, 80, 0.4);
        border-color: #8BC34A;
    }
    50% {
        box-shadow: 0 12px 40px rgba(76, 175, 80, 0.8), 0 0 20px rgba(139, 195, 74, 0.6);
        border-color: #fff;
    }
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.notification-header i {
    font-size: 1.5rem;
    color: #fff;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.real-time-badge {
    background: #ff0000;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

.notification-message {
    font-size: 1rem;
    line-height: 1.4;
    margin: 8px 0;
    font-weight: 500;
}

.invitation-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invitation-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn-view-invitations {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-view-invitations:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-dismiss {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.2);
}

.result-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  margin-left: 7px;
  color: #fff;
}
.result-square.win { background: #28a745; }
.result-square.loss { background: #dc3545; }
.result-square.draw { background: #6c757d; }

/* Join Game Overlay */
.join-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.join-game-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile improvements for join game overlay */
@media (max-width: 768px) {
    .join-game-overlay {
        /* Ensure overlay covers the full viewport on mobile */
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.8); /* Slightly darker on mobile for better contrast */
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    /* Ensure overlay works with dynamic viewport height */
    @supports (height: 100dvh) {
        .join-game-overlay {
            height: 100dvh;
        }
    }
}

.cta-btn {
    background: #928575;
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 0.2rem;
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
    box-shadow: 2 2px 8px #0006;
    border: 1px solid #000; /* Solid black border */
  }
  
  .cta-btn:hover {
    background: #60564a;
  }

  .logo {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 2px;
  }

  nav a, .menu-btn {
    color: #fff;
    margin-left: 2rem;
    text-decoration: none;
    font-size: 1.1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
  }

/* Fade-in-up animation for logo, heading, and quote */
.animated-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animated-fade-in-up[style*="animation-delay"] {
    animation-delay: var(--animation-delay, 0s);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body:not(.authenticated) .video-overlay,
body:not(.authenticated) .video-bg-container,
body:not(.authenticated) .home-container {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
}
body:not(.authenticated) .video-bg-container {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    /* Do not set background to transparent here so the image remains visible */
}

@media (max-width: 768px) {
    .welcome-icon {
        margin-top: 100px !important; /* Move logo down a bit more for non-authenticated users on mobile */
        margin-bottom: 0px !important; /* Bring logo and quote as close as possible on mobile */
    }

    body.authenticated .welcome-icon {
        margin-top: -0.2rem !important;
        margin-top: -3rem !important;
    }
}

@media (max-width: 768px) {
    .welcome-icon {
        width: 320px !important; /* Increased from 280px to 320px */
        height: 320px !important; /* Increased from 280px to 320px */
    }
}

@media (max-width: 768px) {
    .authenticated-hero .hero-content h1 {
        font-size: 2.8rem !important;
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
        background: none !important;
        -webkit-background-clip: unset !important;
        background-clip: unset !important;
        text-shadow: none;
        background-color: unset;
        border-radius: unset;
        display: block;
        width: 100%;
        text-align: center;
        animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        padding: 0;
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 768px) {
    .authenticated-hero .welcome-icon {
        margin-top: 40px !important; /* Move logo higher on mobile when authenticated */
        margin-bottom: 490px !important; /* Greatly increase gap below logo on mobile when authenticated */
    }
}

@media (max-width: 480px) {
    .authenticated-hero .welcome-icon {
        margin-top: 100px !important; /* Move logo further down on very small screens when authenticated */
    }
}

@media (max-width: 768px) {
    .welcome-main {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        align-items: center;
        justify-content: flex-start;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    .welcome-main .spacer {
        display: none !important; /* Remove spacer so elements move up */
    }
    .welcome-main h1 {
        margin-top: 1.2rem !important; /* Small gap below logo */
        margin-bottom: 0.7rem !important; /* Small gap below heading */
    }
    .welcome-main .cta-btn {
        margin-top: 0.7rem !important; /* Small gap below heading */
        margin-bottom: 40px !important; /* Still keep above browser bar */
    }
}

@media (max-width: 768px) {
    .authenticated-hero .hero-content {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        align-items: center;
        justify-content: center;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    .authenticated-hero .welcome-icon {
        margin-bottom: 12px !important;
        margin-top: 0 !important;
    }
    .authenticated-hero .spacer {
        flex: 1;
        width: 100%;
        min-height: 0;
    }
    .authenticated-hero .username-row {
        margin-top: 0 !important;
    }
    .authenticated-hero .scroll-indicator {
        margin-top: 0 !important;
        margin-bottom: 24px;
    }
}


@media (max-width: 768px) {
    .welcome-main .cta-btn {
        margin-bottom: max(40px, env(safe-area-inset-bottom, 0)) !important; /* Always visible above browser bar and safe area */
        position: relative;
        z-index: 10;
    }
    .welcome-main {
        overflow: visible !important;
    }
}

@media (max-width: 768px) {
    .welcome-icon {
        z-index: 10000 !important;
    }
}

@media (max-width: 768px) {
    .welcome-icon {
        margin-bottom: 0.2rem !important; /* Minimize gap below logo */
    }
    .welcome-main h1 {
        margin-top: 0 !important; /* No gap above heading */
        margin-bottom: 0.7rem !important; /* Small gap below heading */
    }
    .authenticated-hero .username-row {
        margin-top: 0 !important; /* No gap above username */
        margin-bottom: 0.7rem !important; /* Small gap below username */
        /* Mobile-specific username wrapping */
        font-size: 1rem !important; /* Smaller font size on mobile */
        word-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        line-height: 1.3;
        max-width: 95vw; /* More space on mobile */
        text-align: center;
    }
}

.header {
    background: transparent !important; /* Transparent header */
    box-shadow: none !important;        /* No shadow */
    transition: background 0.3s, box-shadow 0.3s;
    border: none;
    font-family: 'NXBaskerville', serif !important;
}

body.authenticated .header {
    background: transparent !important; /* Transparent header */
    box-shadow: none !important;        /* No shadow */
    transition: background 0.3s, box-shadow 0.3s;
    border: none;
}

@media (max-width: 768px) {
        body {
            font-family: 'NXBaskerville', serif !important;
    }

    .header .logo {
        font-family: 'NXBaskerville', serif !important;
        font-size: 2.2rem;
        font-weight: 400;
        letter-spacing: 0.02em;
        color: #fff !important;
        text-shadow: 0 1px 4px rgba(0,0,0,0.18);
    }

  body.authenticated .header {
    background: #282825 !important; /* Always black for authenticated users on mobile */
    box-shadow: none !important;
    border: none;
    transition: background 0.3s, box-shadow 0.3s;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  body.authenticated .header.scroll {
    background: linear-gradient(135deg, rgb(42, 41, 43), rgba(42, 41, 43)) !important; /* Keep black when scrolled for authenticated users on mobile */
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.3s, box-shadow 0.3s;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .header {
    background: transparent !important; /* Unauthenticated: transparent by default */
    box-shadow: none !important;
    border: none;
    transition: background 0.3s, box-shadow 0.3s;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .header.scroll {
    background: rgba(30, 30, 30, 0.75) !important; /* Unauthenticated: blurred when scrolled */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.3s, box-shadow 0.3s;
  }
}

/* Add this to your HTML <head>:
<link href="https://fonts.googleapis.com/css2?family=Neucha&display=swap" rel="stylesheet">
*/
.all-games-section, .games-left, .games-right, .all-game-card, .game-row, .game-row-header, .game-status, .game-result, .player-color, .all-game-info, .section-title, .section-header, .placeholder-message, .no-all-games, .view-game-link,.header,.header.header-shadow {
    font-family: 'NXBaskerville', serif !important;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* New Feature Section Styles - Board Brown Theme */
.feature-section {
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
    color: #e9d8fd; /* Light text color from board brown theme */
    font-family: 'Poppins', serif !important;
}

.feature-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ab9b87" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.2;
    z-index: 0;
}

.feature-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.feature-content {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* Feature Badge */
.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #766456 0%, #766456 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(171, 155, 135, 0.3);
}

.feature-badge i {
    color: #ffd700;
}

.feature-heading {
    font-size: 3.2rem;
    font-weight: 600;
    color: #000000; /* Changed to black */
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-family:  'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif, sans-serif;
}

.feature-description {
    font-size: 1.1rem;
    font-weight: 300;
    color: #000000; /* Changed to black */
    line-height: 1.7;
    margin-bottom: 3rem;
    font-family: Mozilla Text, Helvetica, Arial, sans-serif;
}

/* Professional Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: #272727; /* Changed to board brown color */
    color: #767272; /* Changed to black text */
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease; /* Only animate opacity and transform, not all properties */
    position: relative;
    overflow: hidden;
    cursor: default; /* Changed from pointer since click is disabled */
    transform-style: preserve-3d;
    height: 200px;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    touch-action: manipulation; /* Optimize for touch interactions */
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    /* Removed the brown background color */
}

/* Custom Chess Engine card */
.feature-card:nth-child(1)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/chess-engine.jpg');
    background-size: contain;
    background-position: center;
    transition: left 0.4s ease;
    z-index: 1; /* Behind text but above background */
}

.feature-card:nth-child(1):hover::after {
    left: 0;
}

/* Real-time Chat card */
.feature-card:nth-child(2)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/game-history.jpg');
    background-size: contain;
    background-position: center;
    transition: left 0.4s ease;
    z-index: 1; /* Behind text but above background */
}

.feature-card:nth-child(2):hover::after {
    left: 0;
}

/* Classical Music card */
.feature-card:nth-child(3)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/classical-music.jpg');
    background-size: contain;
    background-position: center;
    transition: left 0.4s ease;
    z-index: 1; /* Behind text but above background */
}

.feature-card:nth-child(3):hover::after {
    left: 0;
}

/* Game History card */
.feature-card:nth-child(4)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/themes.jpg');
    background-size: contain;
    background-position: center;
    transition: left 0.4s ease;
    z-index: 1; /* Behind text but above background */
}

.feature-card:nth-child(4):hover::after {
    left: 0;
}

/* Multiple Themes card */
.feature-card:nth-child(5)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('/images/game-history1.jpg');
    background-size: contain;
    background-position: center;
    transition: left 0.4s ease;
    z-index: 1; /* Behind text but above background */
}

.feature-card:nth-child(5):hover::after {
    left: 0;
}

/* Mobile Optimized card */
.feature-card:nth-child(6)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/chat-system.jpg');
    background-size: contain;
    background-position: center;
    transition: left 0.4s ease;
    z-index: 1; /* Behind text but above background */
}

.feature-card:nth-child(6):hover::after {
    left: 0;
}

/* Ensure content stays above the sliding image */
.feature-icon,
.feature-card h3 {
    position: relative;
    z-index: 10; /* Higher z-index to appear above images */
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.feature-card p {
    display: block; /* Show paragraph instead of hiding completely */
    opacity: 0; /* Start invisible */
    max-height: 0; /* Start with no height */
    margin-top: 0; /* No top margin initially */
    overflow: hidden; /* Hide overflow content */
    transition: all 0.3s ease; /* Smooth transition for all changes */
    font-size: 0.9rem; /* Smaller font size for description */
    color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
    line-height: 1.4; /* Good line height for readability */
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    text-align: center; /* Center align text */
    position: relative; /* Ensure proper positioning */
    z-index: 10; /* Higher z-index to appear above images */
}

/* Top border effect */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #2b2b2b; /* Green color matching join button */
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 5; /* Lower than text but higher than background */
}

.feature-card:hover::before {
    transform: scaleX(1);
}

/* Feature icon styling */
.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #696562 0%, #b08f75 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(171, 155, 135, 0.3);
    position: relative;
    z-index: 10; /* Higher z-index to appear above images */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
}

.feature-icon i {
    color: white;
    font-size: 1.3rem;
}

/* Feature card header styling */
.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 300;
    color: #ffffff; /* Changed to black text */
    margin-bottom: 0.5rem;
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; /* Match feature heading */
    transition: all 0.3s ease; /* Smooth transition for all changes */
    opacity: 1; /* Start fully visible */
    transform: translateY(0); /* Start at normal position */
    position: relative;
    z-index: 10; /* Higher z-index to appear above images */
}

/* Hide header and icon, show description on hover */
.feature-card:hover h3 {
    opacity: 0; /* Fade out the header */
    transform: translateY(0); /* Remove movement animation */
    margin-bottom: 0; /* Remove bottom margin when hidden */
}

.feature-card:hover .feature-icon {
    opacity: 0; /* Fade out the icon */
    transform: translateY(0); /* Remove movement animation */
    margin-bottom: 0; /* Remove bottom margin when hidden */
}

/* Show description on hover - centered in the card */
.feature-card:hover p {
    opacity: 1; /* Fade in the description */
    max-height: 100px; /* Allow space for description */
    margin-top: 0; /* Remove top margin for better centering */
    position: absolute; /* Position absolutely for centering */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Perfect centering - no movement animation */
    width: 80%; /* Control width for better readability */
    z-index: 15; /* Ensure it's above all other elements */
    transition: opacity 0.3s ease; /* Only animate opacity, not transform */
}

/* Expanded state styles removed - click functionality disabled */
/* Cards now only show description on hover, centered in the card */

.feature-card-front,
.feature-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.feature-card-front {
    transform: rotateY(0deg);
}

.feature-card-back {
    background: #71645a;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card.flipped {
    transform: rotateY(180deg);
}

.feature-card-back p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-family: 'NXBaskerville', serif;
    margin: 0;
    text-align: center;
}

/* Enhanced Call to Action */
.feature-cta {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'NXBaskerville', serif;
    border: none;
    text-decoration: none;
}

.feature-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.feature-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.feature-btn.secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.feature-btn.secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.feature-pricing {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price {
    font-size: 1.1rem;
    color: #1a202c;
    font-weight: 700;
    font-family: 'NXBaskerville', serif;
}

.subtitle {
    font-size: 0.9rem;
    color: #4a5568;
    font-family: 'NXBaskerville', serif;
}

/* Development Info Section */
.development-info {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.dev-badge i {
    color: #38b2ac;
}

.dev-description {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 1rem;
    font-family: 'NXBaskerville', serif;
    line-height: 1.6;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Additional Features Styles */
.feature-visual {
    margin-top: 3rem;
}

.additional-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.feature-highlight {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-highlight:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.highlight-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.highlight-icon i {
    color: white;
    font-size: 1.5rem;
}

.feature-highlight h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.75rem;
    font-family: 'NXBaskerville', serif;
}

.feature-highlight p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.5;
    font-family: 'NXBaskerville', serif;
    margin: 0;
}

/* SKG WEB Logo Section - Board Brown Theme */
.skgweb-logo-section {
    background: linear-gradient(135deg, #1a1625 0%, #2d3748 100%);
    padding: 8rem 2rem;
    position: relative;
    color: #e9d8fd; /* Light text color from board brown theme */
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skgweb-logo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(171, 155, 135, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(113, 100, 90, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.skgweb-logo-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.skgweb-logo-large {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    animation: logoFloat 6s ease-in-out infinite;
}

.skgweb-logo-large:hover {
    transform: translateY(-10px) scale(1.05);
}

.skgweb-logo-large img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.skgweb-logo-text {
    text-align: center;
    max-width: 600px;
}

.skgweb-logo-text h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: 'NXBaskerville', serif;
    background: linear-gradient(135deg, #ab9b87 0%, #71645a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skgweb-logo-text p {
    font-size: 1.3rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-family: 'NXBaskerville', serif;
    color: #a0a0a0; /* Text dark color from board brown theme */
}

.skgweb-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, #ab9b87 0%, #71645a 100%);
    color: white;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'NXBaskerville', serif;
}

.skgweb-link-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* SKG WEB About Section - Board Brown Theme */
.skgweb-section {
    background: linear-gradient(135deg,  #212121  0%, #212121 100%); 
    padding: 6rem 2rem;
    position: relative;
    color: #e9d8fd; /* Light text color from board brown theme */
}

.skgweb-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(171, 155, 135, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.skgweb-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.skgweb-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    text-align: left;
}

.skgweb-logo {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.skgweb-logo:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.skgweb-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.skgweb-info {
    flex: 1;
    margin-top: 2rem; /* Add spacer between logo and text */
}

.skgweb-info h3 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #ab9b87; /* Primary brown color from board brown theme */
}

.skgweb-info p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #a0a0a0; /* Text dark color from board brown theme */
    font-weight: 376;
}

.skgweb-contact {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .skgweb-contact {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .skgweb-contact .skgweb-btn {
        margin-left: 0 !important;
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}

.skgweb-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(171, 155, 135, 0.2); /* Primary brown with opacity */
    color: #fbfbfb; /* Light text color from board brown theme */
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(171, 155, 135, 0.3);
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.skgweb-btn:hover {
    background: rgba(171, 155, 135, 0.3); /* Primary brown with opacity */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: #fefefe; /* Light text color from board brown theme */
    text-decoration: none;
}

/* Responsive Design for Feature Section */
@media (max-width: 1024px) {
    .feature-heading {
        font-size: 3.2rem;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .additional-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .feature-section {
        padding: 5rem 1.5rem;
    }
    
    .feature-heading {
        font-size: 2.8rem;
    }
    
    .feature-description {
        font-size: 1.2rem;
    }
    
    .feature-cta {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.2rem;
        height: 180px;
    }
    
    .feature-icon {
        width: 45px;
        height: 45px;
    }
    
    .feature-icon i {
        font-size: 1.2rem;
    }
    
    .feature-card h3 {
        font-size: 1rem;
    }
    
    .feature-card p {
        font-size: 0.85rem;
    }
    
    .additional-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 500px;
    }
    
    .feature-highlight {
        padding: 1.5rem;
    }
    
    .highlight-icon {
        width: 50px;
        height: 50px;
    }
    
    .highlight-icon i {
        font-size: 1.3rem;
    }
    
    /* IXLstudio Logo Section Mobile Styles */
    .skgweb-logo-section {
        padding: 5rem 1.5rem;
        min-height: 50vh;
    }
    
    .skgweb-logo-large {
        width: 280px;
        height: 280px;
    }
    
    .skgweb-logo-text h2 {
        font-size: 2.5rem;
    }
    
    .skgweb-logo-text p {
        font-size: 1.1rem;
    }
    
    .skgweb-link-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .skgweb-content {
        gap: 3rem;
    }
    
    .skgweb-logo {
        width: 250px;
        height: 250px;
    }
    
    .skgweb-info h3 {
        font-size: 2.4rem;
    }
    
    .skgweb-info p {
        font-size: 1rem;
    }
    
    .development-info {
        padding: 1.5rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .contact-buttons .feature-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .feature-section {
        padding: 4rem 1rem;
    }
    
    .site-footer {
        padding: 3rem 1rem 1.5rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
    }
    
    .footer-section p {
        font-size: 0.9rem;
    }
    
    .feature-heading {
        font-size: 2.5rem;
    }
    
    .feature-description {
        font-size: 1rem;
        font-weight: 376;
    }
    
    .feature-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .feature-grid {
        gap: 0.8rem;
    }
    
    .feature-card {
        padding: 1.5rem;
        height: 220px; /* Increased height for mobile */
    }
    
    .feature-icon {
        width: 55px; /* Increased size for mobile */
        height: 55px; /* Increased size for mobile */
        margin-bottom: 1rem;
    }
    
    .feature-icon i {
        font-size: 1.4rem; /* Increased icon size for mobile */
    }
    
    .feature-card h3 {
        font-size: 1.2rem; /* Increased font size for mobile */
        font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; /* Match feature heading */
        font-weight: 300;
    }
    
    .feature-card p {
        font-size: 1rem; /* Increased font size for mobile */
        font-family: 'NXBaskerville', serif; /* Original NX Baskerville font */
    }
    
    .feature-cta {
        padding: 1.5rem;
    }
    
    .feature-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .additional-features {
        gap: 1rem;
        max-width: 400px;
    }
    
    .feature-highlight {
        padding: 1.2rem;
    }
    
    .highlight-icon {
        width: 45px;
        height: 45px;
    }
    
    .highlight-icon i {
        font-size: 1.2rem;
    }
    
    .feature-highlight h3 {
        font-size: 1.1rem;
    }
    
    .feature-highlight p {
        font-size: 0.9rem;
    }
    
    .platform-support {
        padding: 3rem 0;
    }
    
    /* IXLstudio Logo Section Small Screen Styles */
    .skgweb-logo-section {
        padding: 4rem 1rem;
        min-height: 40vh;
    }
    
    .skgweb-logo-large {
        width: 220px;
        height: 220px;
    }
    
    .skgweb-logo-text h2 {
        font-size: 2rem;
    }
    
    .skgweb-logo-text p {
        font-size: 1rem;
    }
    
    .skgweb-link-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .skgweb-section {
        padding: 4rem 1rem;
    }
    
    .skgweb-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .skgweb-logo {
        width: 200px;
        height: 200px;
    }
    
    .skgweb-info h3 {
        font-size: 2rem;
    }
    
    .skgweb-info p {
        font-size: 1rem; /* Match desktop pattern */
        font-weight: 376; /* Match desktop pattern */
    }
    
    .skgweb-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .development-info {
        padding: 1.2rem;
    }
    
    .dev-description {
        font-size: 0.9rem;
    }
    
    .contact-buttons {
        gap: 0.6rem;
    }
    
    .contact-buttons .feature-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Contact & Feedback Section - Board Brown Theme */
.contact-section {
    background: linear-gradient(135deg, #282828 0%, #282828 100%); 

    padding: 6rem 2rem;
    position: relative;
    color: #fbfbfb; /* Light text color from board brown theme */
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.contact-header {
    margin-bottom: 4rem;
}

.contact-header h3 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ececec; /* Primary brown color from board brown theme */
    margin-bottom: 1rem;
    font-family: Mozilla Text, 'NXBaskerville', serif;
}

.contact-header p {
    font-size: 1.1rem;
    font-weight: 376;
    color: #c8c8c8; /* Text dark color from board brown theme */
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    width: 100%;
    max-width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.05); /* Card color from board brown theme */
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-align: left;
    color: #e9d8fd; /* Light text color from board brown theme */
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.08); /* Card hover color from board brown theme */
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ab9b87 0%, #71645a 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(171, 155, 135, 0.3);
}

.contact-icon i {
    color: white;
    font-size: 1.5rem;
}

.contact-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ab9b87; /* Primary brown color from board brown theme */
    margin-bottom: 1rem;
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.contact-card p {
    font-size: 1rem;
    color: #a0a0a0; /* Text dark color from board brown theme */
    line-height: 1.6;
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
}

/* Footer Styles
.site-footer {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: white;
    padding: 4rem 2rem 2rem 2rem;
    position: relative;
} */

/* .site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
} */

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.footer-section {
    text-align: center;
}

.footer-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e2e8f0;
    font-family: 'NXBaskerville', serif;
}

.footer-section p {
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-family: 'NXBaskerville', serif;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'NXBaskerville', serif;
}

.footer-section ul li a:hover {
    color: #667eea;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #718096;
    font-family: 'NXBaskerville', serif;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: #667eea;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Contact Form Styles */
.contact-form-container {
    background: rgba(255, 255, 255, 0.05); /* Card color from board brown theme */
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e6e6e6; /* Primary brown color from board brown theme */
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}




.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    margin-top: 1rem;
}

.submit-btn {
    background: linear-gradient(135deg, #202020 0%, #202020 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Mozilla Text, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(171, 155, 135, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(171, 155, 135, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design for Contact Section */
@media (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-header h3 {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 4rem 1.5rem;
    }
    
    .contact-header h3 {
        font-size: 2.2rem;
    }
    
    .contact-header p {
        font-size: 1rem; /* Match desktop pattern */
        font-weight: 350; /* Match desktop pattern */
    }
    
    .contact-content {
        gap: 2rem;
    }
    
    .contact-card {
        padding: 1.5rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-icon i {
        font-size: 1.3rem;
    }
    
    .contact-card h4 {
        font-size: 1.2rem;
    }
    
    .contact-card p {
        font-size: 0.95rem; /* Match desktop pattern */
        font-weight: 350; /* Match desktop pattern */
    }
    
    .contact-form-container {
        padding: 2rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem 0.9rem;
        font-size: 0.95rem;
    }
    
    .submit-btn {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 3rem 1rem;
    }
    
    .contact-header h3 {
        font-size: 1.8rem;
    }
    
    .contact-header p {
        font-size: 0.95rem; /* Slightly smaller for mobile */
        font-weight: 376; /* Match desktop pattern */
    }
    
    .contact-card {
        padding: 1.2rem;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
    }
    
    .contact-icon i {
        font-size: 1.2rem;
    }
    
    .contact-card h4 {
        font-size: 1.1rem;
    }
    
    .contact-card p {
        font-size: 0.9rem; /* Keep small for mobile */
        font-weight: 350; /* Match desktop pattern */
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .form-group {
        gap: 0.4rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .submit-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.theme-toggle-btn {
    background: linear-gradient(135deg, #696562 0%, #b08f75 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-toggle-btn i {
    font-size: 1.1rem;
}

/* CSS Custom Properties for Theme Colors */
:root {
    /* Dark Theme (Current) */
    --feature-bg: linear-gradient(135deg, #313131 0%, #313131 100%);
    --feature-text: #ffffff;
    --feature-description: #ffffff;
    --feature-card-bg: #272727;
    --feature-card-text: #333333;
    --feature-card-heading: #000000;
}

/* Light Theme */
[data-theme="light"] {
    --feature-bg: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    --feature-text: #000000;
    --feature-description: #000000;
    --feature-card-bg: #272727;
    --feature-card-text: #767272;
    --feature-card-heading: #ffffff;
}


/* Apply CSS Variables */
.feature-section {
    background: var(--feature-bg);
}

.feature-heading {
    color: var(--feature-text);
}

.feature-description {
    color: var(--feature-description);
}

.feature-card {
    background: var(--feature-card-bg);
    color: var(--feature-card-text);
}

.feature-card h3 {
    color: var(--feature-card-heading);
}

/* Mobile optimization - hover only */
@media (max-width: 768px) {
    .feature-card:hover h3 {
        opacity: 0; /* Hide header on mobile hover */
        transform: translateY(-10px); /* Move header up on mobile hover */
    }
    
    .feature-card:hover p {
        opacity: 1; /* Show description on mobile hover */
        max-height: 200px; /* Allow space for description */
    }
}

[data-theme="dark"] .feature-card h3{
    color: #f1f0f0; /* Text color for dark theme */
}

[data-theme="dark"] .theme-toggle-btn {
    background: linear-gradient(135deg,  #423a28 0%, #695240 100%);
}