/* Basketball League - Mobile Responsive Design */
/* Clean rewrite based on desktop design with Safari compatibility */

/* Prevent initial scroll positioning issues */
html {
    scroll-behavior: auto !important;
}

body {
    scroll-behavior: auto !important;
}

/* Force page to start at top on mobile */
@media (max-width: 767px) {
    html, body {
        scroll-behavior: auto !important;
        overflow-anchor: none; /* Prevent scroll anchoring */
        scroll-padding-top: 0 !important;
    }
    
    /* Prevent any elements from causing initial scroll */
    * {
        scroll-margin-top: 0 !important;
        scroll-padding-top: 0 !important;
    }
    
    /* Ensure the app container starts at top */
    #app {
        margin-top: 0 !important;
        padding-top: 0 !important;
        scroll-margin-top: 0 !important;
    }
    
    /* Force main sections to not auto-scroll */
    #main-section,
    #challenge-section {
        scroll-margin-top: 0 !important;
    }
}

/* Safari-specific viewport and scrolling fixes */
@supports (-webkit-appearance: none) {
    html {
        height: -webkit-fill-available;
        -webkit-text-size-adjust: 100%;
    }
    
    body {
        min-height: -webkit-fill-available;
        -webkit-overflow-scrolling: touch;
        -webkit-font-smoothing: antialiased;
    }
    
    /* Fix Safari flexbox issues */
    .main-content {
        -webkit-flex-shrink: 0;
        flex-shrink: 0;
    }
    
    /* Fix Safari position fixed issues */
    .main-nav {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* Additional Safari mobile fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    @media (max-width: 767px) {
        /* Force Safari to respect viewport */
        html {
            -webkit-text-size-adjust: none;
        }
        
        body {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
        
        /* Fix Safari flexbox rendering */
        .main-content,
        .champion-side,
        .versus-side {
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
        
        /* Fix Safari position fixed with keyboard */
        .main-nav {
            position: -webkit-sticky;
            position: sticky;
            bottom: 0;
        }
    }
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */
@media (max-width: 767px) {
    
    /* === TEAM NAME - CLEAN PRODUCTION VERSION === */
    .team-info h1,
    .team-top-section h1,
    #champion-name {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #ffffff !important;
        font-size: 1.5rem !important;
        text-align: center !important;
        margin: 2rem auto 1rem auto !important;
        z-index: 100 !important;
        position: relative !important;
        padding: 0 !important;
        width: 100% !important;
        font-weight: 900 !important;
        letter-spacing: 0.05em !important;
        /* Clean text shadow for visibility */
        text-shadow: 
            2px 2px 0px #000000,
            -2px -2px 0px #000000,
            2px -2px 0px #000000,
            -2px 2px 0px #000000;
    }
    
    /* Force content into team name if empty */
    .team-info h1:empty::before,
    #champion-name:empty::before {
        content: "擂台主: TBC" !important;
        display: block !important;
        color: #ffffff !important;
        font-weight: 900 !important;
    }
    
    /* Ensure team-info container is positioned properly */
    .team-info {
        margin-top: 2rem !important;
        padding-top: 1rem !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* Ensure team-top-section is visible and positioned */
    .team-top-section {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* === ENSURE HAMBURGER MENU IS VISIBLE === */
    .hamburger-menu {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: calc(1rem + 30px) !important; /* Below contact bar on mobile */
        left: 1rem !important;
        z-index: 99999 !important;
        width: 50px !important;
        height: 50px !important;
        background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%) !important;
        border-radius: 12px !important;
        border: none !important;
        cursor: pointer !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
    }
    
    .hamburger-lines {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 22px !important;
        height: 18px !important;
    }
    
    .hamburger-lines .line {
        display: block !important;
        width: 100% !important;
        height: 3px !important;
        background: #1a1a1a !important;
        border-radius: 1px !important;
    }
    
    /* === AGGRESSIVE LOGO SIZE CONSTRAINTS === */
    /* Ensure NO large logos appear anywhere on mobile */
    img[src*="logo.gif"]:not(.mobile-floating-logo-image),
    img[alt*="logo"]:not(.mobile-floating-logo-image),
    img[alt*="Logo"]:not(.mobile-floating-logo-image),
    .floating-logo-image,
    .hamburger-logo {
        max-width: 60px !important;
        max-height: 60px !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* EXCEPTION: Mobile floating logo centered within container */
    .mobile-floating-logo-image {
        max-width: 110px !important; /* Slightly smaller than container for padding */
        max-height: 50px !important; /* Slightly smaller than container for padding */
        width: auto !important; /* Auto width to maintain aspect ratio */
        height: auto !important; /* Auto height to maintain aspect ratio */
        object-fit: contain !important; /* Fit within container */
        object-position: center !important; /* Center within container */
        box-sizing: border-box !important; /* Include padding/border in size */
        margin: auto !important; /* Center within flex container */
    }
    
    /* Specifically constrain hamburger menu logo - EXCEPT when active */
    .hamburger-menu .hamburger-logo:not(.hamburger-menu.active .hamburger-logo),
    .hamburger-menu img:not(.hamburger-menu.active img) {
        width: 32px !important;
        height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }
    
    /* When hamburger menu is active, allow logo to fill entire button */
    .hamburger-menu.active .hamburger-logo,
    .hamburger-menu.active img {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: cover !important;
    }
    
    /* Hide any potentially large text logos */
    .logo-text,
    .logo-fallback .logo-text {
        font-size: 1rem !important;
        max-width: 200px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    /* EXCEPTION: Team logo should be properly sized and visible */
    #team-logo-image,
    .team-logo-img,
    #team-logo-image.team-logo-img,
    .team-logo-img#team-logo-image,
    .team-logo-display .team-logo-img {
        width: 80px !important;
        height: 80px !important;
        max-width: 80px !important;
        max-height: 80px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin: 0 auto !important;
        object-fit: contain !important;
        border-radius: 15px !important;
    }
    
    /* === MOBILE BODY BACKGROUND === */
    body {
        background: url('../images/default-bg.svg') center center/cover no-repeat fixed, #000 !important;
        background-size: cover !important;
    }
    
    /* Hide champion background on mobile - use only default-bg.svg */
    .champion-background {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Hide desktop floating logo on mobile */
    .floating-logo {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
    }
    
    /* Hide logo fallback on mobile to prevent large text logo */
    .logo-fallback,
    .logo-fallback * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Ensure team name is properly sized on mobile - override desktop styles */
    #champion-name.team-name,
    .team-name#champion-name,
    h1.team-name,
    .team-name {
        font-size: 1.5rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
        /* Ensure it doesn't appear too large */
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        /* Ensure it's not hidden by other rules */
        position: relative !important;
        z-index: 1000 !important;
        color: #ffffff !important;
        /* Force text to be visible */
        text-shadow: 
            2px 2px 0px #000000,
            -2px -2px 0px #000000,
            2px -2px 0px #000000,
            -2px 2px 0px #000000 !important;
        line-height: 1.2 !important;
        order: 1 !important;
    }
    
    /* Team logo display - perfectly centered */
    .team-logo-display {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 2rem auto !important;
        order: 2 !important;
        width: 100% !important;
        text-align: center !important;
        position: relative !important;
        z-index: 50 !important;
    }
    
    /* === MOBILE BODY SPACING === */
    body {
        padding-top: 30px; /* Space for thinner mobile contact bar */
        padding-bottom: 120px; /* Ensure all content has space for floating elements */
    }
    
    /* === MAIN LAYOUT === */
    .main-display {
        height: auto !important;
        min-height: 100vh;
        min-height: -webkit-fill-available; /* Safari fix */
        min-height: calc(var(--vh, 1vh) * 100); /* Safari viewport fix */
        overflow: visible !important;
        position: relative !important;
        /* Safari-specific fixes */
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translateZ(0); /* Force hardware acceleration */
        transform: translateZ(0);
        /* Additional Safari fixes */
        width: 100%;
        max-width: 100vw;
        /* Ensure this section is always at the top */
        scroll-margin-top: 0 !important;
        /* Force this to be the first visible section */
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .main-content {
        display: -webkit-flex !important; /* Safari prefix */
        display: flex !important;
        -webkit-flex-direction: column !important; /* Safari prefix */
        flex-direction: column !important;
        height: auto !important;
        position: relative !important;
        padding-bottom: 120px; /* Space for floating WhatsApp and logo elements */
        /* Safari-specific fixes */
        -webkit-transform: translateZ(0); /* Force hardware acceleration */
        transform: translateZ(0);
    }
    
    /* === CHAMPION SECTION === */
    .champion-side {
        width: 100% !important;
        -webkit-flex: none !important; /* Safari prefix */
        flex: none !important;
        padding: 1rem !important;
        -webkit-order: 1 !important; /* Safari prefix */
        order: 1 !important;
        display: -webkit-flex !important; /* Safari prefix */
        display: flex !important;
        -webkit-flex-direction: column !important; /* Safari prefix */
        flex-direction: column !important;
        -webkit-justify-content: flex-start !important; /* Safari prefix */
        justify-content: flex-start !important;
        -webkit-align-items: center !important; /* Safari prefix */
        align-items: center !important;
        /* Safari-specific fixes */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .team-info {
        max-width: 100% !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
        padding: 0.5rem !important; /* Changed to 0.5rem to match desktop */
        border-radius: 15px !important;
        min-height: auto !important;
        text-align: center !important;
        /* Keep desktop animations but make them visible immediately on mobile */
        transform: none !important;
        opacity: 1 !important;
        animation: none !important;
        display: block !important;
        visibility: visible !important;
        position: relative !important;
        z-index: 100 !important;
    }
    
    .team-content {
        transform: none;
        opacity: 1;
        max-height: none;
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
    }
    
    /* Ensure all team content elements are visible but respect their display types */
    .team-content > * {
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Specifically ensure team info content is visible with proper display types */
    .team-info .team-content,
    .team-content {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .team-top-section {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        order: 1 !important;
    }
    
    .team-bottom-section {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
        order: 2 !important;
    }
    
    /* Force team name and logo to be visible with proper layout */
    .team-top-section .team-name,
    .team-name {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 1.5rem !important;
        text-align: center !important;
        margin: 1rem auto !important;
        color: #ffffff !important;
        z-index: 9999 !important;
        position: relative !important;
        width: 100% !important;
        order: 1 !important;
        /* Force text to be visible */
        text-shadow: 
            2px 2px 0px #000000,
            -2px -2px 0px #000000,
            2px -2px 0px #000000,
            -2px 2px 0px #000000 !important;
    }
    
    .team-top-section .team-logo-display,
    .team-logo-display {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin: 1rem auto !important;
        width: 100% !important;
        order: 2 !important;
    }
    
    /* Additional team name visibility enforcement - CLEAN VERSION */
    h1#champion-name,
    #champion-name,
    .team-top-section h1,
    .team-top-section .team-name {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #ffffff !important;
        font-size: 1.5rem !important;
        text-align: center !important;
        margin: 1rem 0 !important;
        z-index: 100 !important;
        position: relative !important;
        width: 100% !important;
        /* Ensure it's not hidden by transforms or other properties */
        transform: none !important;
        clip: none !important;
        clip-path: none !important;
        /* Clean text shadow for visibility */
        text-shadow: 
            2px 2px 0px #000000,
            -2px -2px 0px #000000,
            2px -2px 0px #000000,
            -2px 2px 0px #000000;
        font-weight: 900;
        letter-spacing: 0.05em;
    }
    
    /* Ensure the team name content is not empty - fallback */
    h1#champion-name:empty::before {
        content: "擂台主: TBC" !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #ffffff !important;
        font-size: 1.5rem !important;
        text-align: center !important;
    }
    
    /* Mobile team photo - show on mobile under team logo */
    .mobile-team-photo {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 150px !important;
        border-radius: 15px !important;
        margin: 1rem 0 !important;
        position: relative !important;
        overflow: hidden !important;
        aspect-ratio: 16/9 !important;
        background: rgba(0, 0, 0, 0.1) !important;
        order: 3 !important; /* Positioned after team name (order: 1) and team logo (order: 2) */
    }
    
    .mobile-team-img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        border-radius: 15px !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-team-overlay {
        display: none;
    }
    
    /* Ensure desktop team name is always visible */
    .team-name {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative;
        z-index: 10; /* Ensure it's above other elements */
    }
    
    .mobile-team-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: all 0.3s ease;
        border-radius: 20px;
    }
    
    .mobile-team-img:hover,
    .mobile-team-img:active {
        transform: scale(1.05);
    }
    
    /* Mobile team photo overlay removed - using standard layout */
    
    /* Mobile team overlay removed - using standard layout */
    
    /* === VERSUS SECTION - IMPROVED MOBILE LAYOUT === */
    .versus-side {
        width: 100% !important;
        flex: none !important;
        padding: 1rem !important; /* Reduced padding */
        order: 2 !important;
        border-left: none !important;
        border-top: 2px solid rgba(212, 175, 55, 0.3) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: auto !important;
        background: rgba(0, 0, 0, 0.1) !important;
        margin: 0.5rem 0 !important; /* Reduced margin */
        border-radius: 15px !important;
        box-sizing: border-box !important; /* Ensure proper sizing */
        overflow: hidden !important; /* Prevent content overflow */
    }
    
    .versus-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        width: 95% !important; /* Increased to fill more screen */
        max-width: 350px !important; /* Increased max-width for larger display */
        padding: 0.8rem 0.4rem !important; /* Increased padding for larger container */
        margin: 0 auto 1rem auto !important;
        margin-left: calc(50% + 10px) !important; /* Reduced from 15px to 10px (move left 5px) */
        transform: translateX(-50%) !important; /* Center from the new position */
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(212, 175, 55, 0.2) !important;
        box-sizing: border-box !important;
        gap: 0.3rem !important; /* Increased gap for larger container */
        overflow: hidden !important; /* Prevent content overflow */
    }
    
    .team-logo {
        flex: 0 0 auto !important;
        width: 90px !important; /* Increased from 80px for larger display */
        max-width: 90px !important;
        padding: 0.7rem 0.4rem !important; /* Increased padding for larger container */
        border-radius: 10px !important; /* Increased border radius */
        min-height: 125px !important; /* Increased height for larger display */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        background: rgba(255, 255, 255, 0.05) !important; /* Slightly more visible background */
        border: 1px solid rgba(255, 255, 255, 0.15) !important; /* More visible border */
        margin: 0 !important;
    }
    
    .team-logo img {
        width: 65px !important; /* Increased from 55px for larger display */
        height: 65px !important; /* Increased from 55px for larger display */
        margin-bottom: 0.5rem !important; /* Increased margin */
        object-fit: contain !important;
        border-radius: 8px !important; /* Increased border radius */
    }
    
    .team-label {
        font-size: 0.8rem !important; /* Increased from 0.7rem */
        letter-spacing: 0.4px !important; /* Increased letter spacing */
        text-align: center !important;
        color: #ffd700 !important;
        font-weight: bold !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
        line-height: 1.3 !important; /* Increased line height */
    }
    
    .vs-element {
        flex: 0 0 auto !important;
        width: 75px !important; /* Increased from 65px for larger display */
        height: 125px !important; /* Increased from 110px to match team logos */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        order: 2 !important;
        margin: 0 0.4rem !important; /* Increased margin for larger spacing */
        position: relative !important;
    }
    
    .vs-logo {
        width: 60px !important; /* Increased from 50px for larger display */
        height: 40px !important; /* Increased proportionally */
        object-fit: contain !important;
        filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.7)) !important; /* Enhanced glow */
        margin: 0 auto !important;
    }
    
    .champion-logo {
        order: 1 !important;
    }
    
    .challenger-logo {
        order: 3 !important;
    }
    
    /* Match info - better mobile styling */
    .match-info {
        position: relative !important;
        width: 90% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        padding: 1rem !important;
        font-size: 0.85rem !important;
        text-align: center !important;
        line-height: 1.4 !important;
        background: rgba(0, 0, 0, 0.6) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(212, 175, 55, 0.4) !important;
        display: block !important;
        order: 3 !important;
    }
    
    .status-text {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
        text-align: center;
    }
    
    .pulse-dot {
        width: 4px;
        height: 4px;
    }
    
    /* === CHALLENGE FORM SECTION === */
    .challenge-form-section {
        padding: 2rem 1rem;
        padding-bottom: 120px; /* Extra space for floating elements */
        order: 3;
        /* Prevent this section from being scroll target */
        scroll-margin-top: 0 !important;
    }
    
    .form-container {
        padding: 1.5rem; /* Match team-info padding */
        margin: 0;
        border-radius: 15px;
    }
    
    /* Ensure form header aligns exactly with team content */
    .challenge-form-section .form-container {
        padding-left: 1.5rem; /* Match team-info padding exactly */
        padding-right: 1.5rem;
    }
    
    .challenge-form-section .form-header {
        justify-content: center; /* Center the header content */
        text-align: center;
        margin: 0;
        padding: 0;
    }
    
    .challenge-form-section .form-container h2 {
        text-align: center; /* Center the heading text */
        margin: 0;
        padding: 0;
        position: relative;
        left: 0;
    }
    
    .form-header {
        flex-direction: row;
        align-items: center;
        justify-content: center; /* Center the content */
        gap: 1rem;
        text-align: center; /* Center align text */
        padding: 0; /* Remove padding */
        margin: 0; /* Remove margin */
    }
    
    .form-container h2 {
        font-size: 1.5rem;
        margin: 0; /* Remove all margins */
        padding: 0; /* Remove all padding */
        text-align: center; /* Center align text */
        flex: 1; /* Take available space */
    }
    
    /* WhatsApp inquiry removed from form header */
    
    .whatsapp-icon {
        width: 20px; /* Adjusted to match smaller container */
        height: 20px;
    }
    
    /* === MOBILE HAMBURGER MENU === */
    .hamburger-menu {
        display: flex !important; /* Show on mobile */
        top: 1rem;
        left: 1rem;
        width: 40px; /* Reduced from 45px */
        height: 40px; /* Reduced from 45px */
        padding: 4px; /* Reduced from 5px */
        background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
        border: none;
        border-radius: 10px; /* Reduced from 12px */
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
        z-index: 1002;
        position: fixed;
    }
    
    /* Hamburger Lines Styling */
    .hamburger-lines {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 20px;
        height: 18px; /* Increased height for better spacing */
        transition: all 0.3s ease;
    }
    
    .hamburger-lines .line {
        display: block;
        width: 100%;
        height: 3px; /* Slightly thicker for better visibility */
        background: #1a1a1a; /* Darker for better contrast */
        border-radius: 1px;
        transition: all 0.3s ease;
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); /* Add subtle shadow */
    }
    
    /* Logo styling (hidden by default) */
    .hamburger-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .hamburger-logo.hidden {
        display: none;
    }
    
    /* Active state - hide lines, show logo */
    .hamburger-menu.active .hamburger-lines {
        display: none;
    }
    
    .hamburger-menu.active .hamburger-logo {
        display: block;
        width: 100% !important; /* Fill entire button width */
        height: 100% !important; /* Fill entire button height */
        max-width: none !important; /* Remove size constraints */
        max-height: none !important; /* Remove size constraints */
        object-fit: cover !important; /* Fill the entire area */
        border-radius: 10px !important; /* Match button border radius */
    }
    
    /* Hover effects */
    .hamburger-menu:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    }
    
    /* === MOBILE HAMBURGER NAVIGATION === */
    .hamburger-nav {
        display: block !important; /* Show on mobile */
    }
    
    /* Ensure floating elements are always visible and floating on mobile across all pages - MOBILE ONLY */
    @media (max-width: 767px) {
        .mobile-floating-logo {
            display: block !important;
            position: fixed !important;
            visibility: visible !important;
            pointer-events: auto !important;
            z-index: 9999 !important; /* Ensure they're always on top */
            /* Force hardware acceleration for smooth scrolling */
            transform: translateZ(0) !important;
            -webkit-transform: translateZ(0) !important;
            will-change: transform !important;
        }
        
        /* Position mobile floating logo at top right with centered content */
        .mobile-floating-logo {
            top: calc(0.5rem + 30px) !important; /* Below contact bar on mobile */
            right: 0.8rem !important; /* Moved 3px left from 0.5rem */
            bottom: auto !important; /* Override any bottom positioning */
            left: auto !important; /* Override any left positioning */
            width: 120px !important; /* Fixed container width */
            height: 60px !important; /* Fixed container height */
            max-width: 120px !important; /* Limit width */
            max-height: 60px !important; /* Limit height */
            display: flex !important; /* Use flexbox for centering */
            align-items: center !important; /* Center vertically */
            justify-content: center !important; /* Center horizontally */
        }
    }
}

/* === SMALL MOBILE (480px and below) === */
@media (max-width: 480px) {
    /* Extra spacing for small mobile */
    body {
        padding-bottom: 140px; /* More space on smaller screens */
    }
    
    .champion-side,
    .versus-side {
        padding: 0.8rem;
    }
    
    .team-info {
        padding: 0.5rem; /* Changed to 0.5rem to match desktop */
        margin-bottom: 0.8rem;
    }
    
    .team-name {
        font-size: 1.8rem;
    }
    
    .team-logo-img {
        width: 70px;
        height: 70px;
    }
    
    /* Mobile team photo hidden - using standard layout */
    
    .mobile-team-name {
        font-size: 1.8rem; /* Smaller font for small screens */
    }
    
    .mobile-team-logo {
        width: 60px;
        height: 60px;
    }
    
    .team-description {
        font-size: 0.9rem;
    }
    
    .streak-counter {
        padding: 0.6rem 1rem;
        max-width: 100%;
    }
    
    .streak-label {
        font-size: 0.8rem;
    }
    
    .streak-number {
        font-size: 1.8rem;
    }
    
    .versus-container {
        padding: 0.8rem;
        margin-bottom: 0.8rem; /* Space for match info */
    }
    
    .vs-logo {
        width: 60px; /* Increased from 50px */
        height: 40px; /* Increased from 33px */
    }
    
    .match-info {
        padding: 0.72rem; /* 20% increase from 0.6rem */
        font-size: 0.78rem; /* 20% increase from 0.65rem */
        margin-top: 0.8rem;
        width: 60%; /* 20% increase from 50% */
        max-width: 60%; /* 20% increase from 50% */
    }
    
    .match-detail,
    .match-label,
    .match-value {
        font-size: 0.84rem; /* 20% increase from 0.7rem */
    }
    
    .team-logo {
        padding: 0.8rem; /* Increased from 0.4rem */
        min-height: 120px; /* Increased from 100px */
        max-width: 40%; /* Increased for larger logos */
    }
    
    .team-logo img {
        width: 70px; /* Increased from 50px */
        height: 70px; /* Increased from 50px */
    }
    
    .team-label {
        font-size: 0.7rem;
    }
    

    
    .player-card {
        flex: 0 0 90px;
        padding: 0.5rem;
        min-width: 90px;
    }
    
    .player-photo {
        width: 60px;
        height: 60px;
    }
    
    .player-name {
        font-size: 0.75rem;
    }
    
    .player-position {
        font-size: 0.65rem;
    }
    
    .minimize-btn {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .team-info.minimized .minimize-btn {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    /* Form header adjustments for small mobile */
    .form-container h2 {
        font-size: 1.3rem; /* Slightly smaller for small screens */
        margin: 0; /* Remove all margins */
        padding: 0; /* Remove all padding */
        text-align: center; /* Center align on small screens */
    }
    
    /* Ensure consistent alignment on small mobile */
    .challenge-form-section .form-container {
        padding-left: 1rem; /* Match smaller team-info padding on small mobile */
        padding-right: 1rem;
    }
    
    /* WhatsApp inquiry removed from form header */
    
    /* Hide social sharing buttons on mobile - only show logo.gif */
    .social-share-container,
    button[title*="分享到"],
    .social-share-container * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
    }
    
    /* Final safety net - constrain any potentially large elements */
    * {
        max-width: 100vw !important;
    }
    
    /* Ensure no element can be larger than screen on mobile */
    img, svg, canvas, video {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Specifically target logo-related elements but exclude team logo and mobile floating logo */
    [class*="logo"]:not(.team-logo-img):not(.mobile-floating-logo-image), 
    [id*="logo"]:not(#team-logo-image):not(.mobile-floating-logo-image), 
    [src*="logo"]:not([id="team-logo-image"]):not(.mobile-floating-logo-image) {
        max-width: 60px !important;
        max-height: 60px !important;
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-width: 767px) and (orientation: landscape) and (max-height: 500px) {
    .main-content {
        flex-direction: row;
        padding-bottom: 100px; /* Space for floating elements in landscape */
    }
    
    .champion-side {
        flex: 1;
        order: 1;
        padding: 0.8rem;
    }
    
    .versus-side {
        flex: 0 0 300px;
        order: 2;
        padding: 0.8rem;
        border-top: none;
        border-left: 2px solid rgba(212, 175, 55, 0.3);
    }
    
    .team-info {
        margin-bottom: 0.5rem;
        padding: 0.5rem; /* Changed to 0.5rem to match desktop */
        min-height: auto;
    }
    
    /* Mobile team photo removed - using standard layout */
    
    .mobile-team-logo {
        width: 50px;
        height: 50px;
    }
    
    .team-name {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }
    
    .team-description {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .streak-counter {
        padding: 1.5rem 0.8rem; /* Maintain increased padding on smaller screens */
        min-height: 70px; /* Maintain min-height on smaller screens */
        max-width: 200px;
    }
    
    .player-carousel {
        margin-top: -40px; /* Maintain negative margin-top on smaller screens */
    }
    
    .versus-container {
        flex-direction: column;
        gap: 0.5rem;
        height: 100%;
        justify-content: space-around;
        padding: 0.5rem;
    }
    
    .team-logo {
        max-width: 100%;
        min-height: 60px;
        padding: 0.5rem;
    }
    
    .team-logo img {
        width: 40px;
        height: 40px;
    }
    
    .vs-element {
        height: 50px;
        order: 2;
    }
    
    .vs-logo {
        width: 40px;
        height: 27px;
    }
    
    .champion-logo {
        order: 1;
    }
    
    .challenger-logo {
        order: 3;
    }
    
    /* Keep navigation at bottom even in landscape */
    .main-nav {
        padding: 0.3rem;
    }
    
    .main-nav ul {
        padding: 0.3rem;
    }
    
    .main-nav a {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
        min-height: 40px;
    }
}



/* === ACCESSIBILITY === */
@media (max-width: 767px) {
    /* === RULES PAGE MOBILE STYLES === */
    .rules-page {
        padding: 1rem 0 120px 0 !important; /* Normal bottom padding, top space handled by body */
    }
    
    /* Desktop rules page - ensure no overlap */
    @media (min-width: 769px) {
        .rules-page {
            padding-top: 2rem !important; /* Extra space below contact bar on desktop */
        }
    }
    
    /* Hide desktop navigation on mobile */
    .desktop-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Ensure hamburger navigation is visible */
    .hamburger-nav {
        display: block !important;
    }
    
    /* === FEES PAGE MOBILE STYLES === */
    .fees-page {
        padding: 1rem 0 120px 0 !important; /* Normal bottom padding, top space handled by body */
        display: block !important; /* Ensure page is visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Desktop fees page - ensure no overlap */
    @media (min-width: 769px) {
        .fees-page {
            padding-top: 2rem !important; /* Extra space below contact bar on desktop */
        }
    }
    
    .fees-container {
        padding: 0 1rem !important; /* Reduced side padding */
        max-width: 100% !important;
        display: block !important; /* Ensure container is visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Fee sections mobile optimization */
    .fee-section {
        margin-bottom: 1rem !important; /* Reduced margin */
        border-radius: 10px !important; /* Smaller border radius */
        display: block !important; /* Ensure sections are visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .fee-grid {
        grid-template-columns: 1fr !important; /* Single column on mobile */
        gap: 1rem !important;
        display: grid !important; /* Ensure grid is visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .fee-item {
        padding: 1rem !important; /* Reduced padding */
        text-align: center !important;
        display: block !important; /* Ensure items are visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .fee-amount {
        font-size: 1.5rem !important; /* Slightly smaller on mobile */
        display: block !important; /* Ensure amounts are visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Rules sections mobile optimization */
    .rule-section {
        margin-bottom: 1rem !important; /* Reduced margin */
        border-radius: 10px !important; /* Smaller border radius */
        display: block !important; /* Ensure sections are visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .rules-container {
        padding: 0 1rem !important; /* Reduced side padding */
        max-width: 100% !important;
        display: block !important; /* Ensure container is visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Common mobile styles for both fees and rules pages */
    .section-header {
        padding: 1rem 1.5rem !important; /* Reduced padding */
        display: block !important; /* Ensure header is visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .section-title {
        font-size: 1.2rem !important; /* Reduced from larger size */
        line-height: 1.3 !important;
        display: block !important; /* Ensure title is visible */
        visibility: visible !important;
        opacity: 1 !important;
        color: #d4af37 !important; /* Ensure color is visible */
    }
    
    .section-content {
        padding: 1rem 1.5rem !important; /* Reduced padding */
        font-size: 0.9rem !important; /* Slightly smaller text */
        line-height: 1.6 !important; /* Better line spacing */
        display: block !important; /* Ensure content is visible */
        visibility: visible !important;
        opacity: 1 !important;
        max-height: none !important; /* Override any height restrictions */
        overflow: visible !important; /* Override any overflow restrictions */
    }
    
    .section-content p {
        margin-bottom: 0.8rem !important; /* Reduced margin */
        display: block !important; /* Ensure paragraphs are visible */
        visibility: visible !important;
        opacity: 1 !important;
        color: rgba(255, 255, 255, 0.9) !important; /* Ensure text color is visible */
    }
    
    .page-header {
        margin-bottom: 2rem !important; /* Reduced margin */
        padding: 1rem 0 !important; /* Reduced padding */
        display: block !important; /* Ensure header is visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .page-title {
        font-size: 2rem !important; /* Reduced from 3rem */
        margin-bottom: 0.5rem !important;
        display: block !important; /* Ensure title is visible */
        visibility: visible !important;
        opacity: 1 !important;
        color: #d4af37 !important; /* Ensure color is visible */
    }
    
    .page-subtitle {
        font-size: 1rem !important; /* Reduced from 1.2rem */
        display: block !important; /* Ensure subtitle is visible */
        visibility: visible !important;
        opacity: 1 !important;
        color: rgba(255, 255, 255, 0.9) !important; /* Ensure subtitle is visible on mobile */
    }
    
    /* Competition format mobile styles */
    .competition-format {
        gap: 1rem !important; /* Reduced gap */
    }
    
    .format-category {
        padding: 1rem !important; /* Reduced padding */
        border-radius: 8px !important; /* Smaller border radius */
    }
    
    .format-category h4 {
        font-size: 1rem !important; /* Reduced font size */
        margin-bottom: 0.6rem !important;
    }
    
    .format-rule {
        padding: 0.5rem !important; /* Reduced padding */
        gap: 0.5rem !important; /* Reduced gap */
    }
    
    .rule-num {
        width: 18px !important; /* Smaller size */
        height: 18px !important;
        font-size: 0.7rem !important;
    }
    
    /* Payment info mobile styles */
    .payment-info {
        padding: 1rem !important; /* Reduced padding */
        margin-top: 1rem !important;
        border-radius: 10px !important;
    }
    
    .payment-title {
        font-size: 1.1rem !important; /* Reduced font size */
        margin-bottom: 0.8rem !important;
    }
    
    .payment-text {
        font-size: 0.9rem !important; /* Smaller text */
        line-height: 1.5 !important;
    }
    
    /* Expandable sections mobile optimization */
    .expandable-section {
        margin-bottom: 1rem !important; /* Reduced margin */
        border-radius: 10px !important; /* Smaller border radius */
    }
    
    .section-header {
        padding: 1rem 1.5rem !important; /* Reduced padding */
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .section-title {
        font-size: 1.1rem !important; /* Reduced from 1.3rem */
        line-height: 1.3 !important;
        flex: 1 !important;
        margin-right: 1rem !important;
    }
    
    .expand-icon {
        font-size: 1.2rem !important; /* Reduced from 1.5rem */
        flex-shrink: 0 !important;
    }
    
    /* Section content mobile optimization - ALWAYS VISIBLE */
    .section-content {
        max-height: none !important; /* Always show content on mobile */
        overflow: visible !important; /* Always show content on mobile */
        padding: 1rem 1.5rem !important; /* Always have padding on mobile */
        display: block !important; /* Ensure content is visible */
        visibility: visible !important;
        opacity: 1 !important;
        transition: none !important; /* Remove transitions on mobile */
    }
    
    /* Override expandable behavior on mobile - make all sections expanded */
    .expandable-section .section-content {
        max-height: none !important; /* Always show content */
        overflow: visible !important; /* Always show content */
        padding: 1rem 1.5rem !important; /* Always have padding */
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure expanded sections also work properly */
    .expandable-section.expanded .section-content {
        max-height: none !important; /* Always show content */
        padding: 1rem 1.5rem !important; /* Consistent padding */
        overflow: visible !important; /* Always show content */
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .section-text {
        font-size: 0.9rem !important; /* Slightly smaller text */
        line-height: 1.6 !important; /* Better line spacing */
        color: rgba(255, 255, 255, 0.95) !important; /* Better contrast */
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    /* Ensure bullet points are properly formatted on mobile */
    .section-text br {
        margin-bottom: 0.3rem !important;
    }
    
    /* Contact info mobile optimization */
    .contact-info {
        padding: 1.5rem !important; /* Reduced padding */
        margin-top: 1.5rem !important;
        border-radius: 10px !important;
    }
    
    .contact-title {
        font-size: 1.2rem !important; /* Reduced from 1.5rem */
        margin-bottom: 1rem !important;
    }
    
    .contact-details {
        grid-template-columns: 1fr !important; /* Single column on mobile */
        gap: 1rem !important;
    }
    
    .contact-item {
        padding: 0.8rem !important; /* Reduced padding */
        font-size: 0.9rem !important;
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
    }
    
    .contact-icon {
        font-size: 1.2rem !important; /* Reduced from 1.5rem */
        width: 25px !important; /* Reduced from 30px */
        flex-shrink: 0 !important;
    }
    
    .contact-text {
        font-size: 0.9rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Fee calculator mobile optimization */
    .fee-calculator {
        padding: 0 !important;
    }
    
    .calculator-row {
        padding: 0.8rem 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .calculator-label {
        font-size: 0.9rem !important;
        flex: 1 !important;
        margin-right: 1rem !important;
    }
    
    .calculator-amount {
        font-size: 0.9rem !important;
        font-weight: bold !important;
        color: #d4af37 !important;
        flex-shrink: 0 !important;
    }
    
    .calculator-total {
        padding: 1rem 0 !important;
        border-top: 2px solid rgba(212, 175, 55, 0.3) !important;
        margin-top: 1rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .total-label {
        font-size: 1rem !important;
        font-weight: bold !important;
        color: #fff !important;
    }
    
    .total-amount {
        font-size: 1.1rem !important;
        font-weight: bold !important;
        color: #d4af37 !important;
    }
    
    .calculator-note {
        font-size: 0.8rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        text-align: center !important;
        margin-top: 1rem !important;
        padding: 0.5rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 5px !important;
    }
    
    /* Payment methods mobile optimization */
    .payment-methods {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* Two columns on mobile */
        gap: 1rem !important;
    }
    
    .payment-method {
        padding: 1rem !important;
        text-align: center !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .payment-icon {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .payment-name {
        font-size: 0.8rem !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }
    
    /* Additional charges mobile optimization */
    .additional-charges {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .charge-item {
        padding: 1rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
    }
    
    .charge-info {
        flex: 1 !important;
        margin-right: 1rem !important;
    }
    
    .charge-name {
        font-size: 0.9rem !important;
        font-weight: bold !important;
        color: #fff !important;
        margin-bottom: 0.3rem !important;
    }
    
    .charge-description {
        font-size: 0.8rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        line-height: 1.4 !important;
    }
    
    .charge-amount {
        font-size: 0.9rem !important;
        font-weight: bold !important;
        color: #d4af37 !important;
        flex-shrink: 0 !important;
        text-align: right !important;
    }
    
    /* Fee overview mobile optimization */
    .fee-overview {
        text-align: center !important;
        padding: 2rem 1rem !important;
        margin-bottom: 2rem !important;
        background: rgba(212, 175, 55, 0.1) !important;
        border-radius: 10px !important;
        border: 1px solid rgba(212, 175, 55, 0.3) !important;
    }
    
    .application-fee {
        font-size: 2rem !important; /* Reduced from larger size */
        font-weight: bold !important;
        color: #d4af37 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .fee-label {
        font-size: 1rem !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }
    
    /* Focus indicators */
    .main-nav a:focus,
    .carousel-btn:focus,
    .nav-btn:focus,
    .submit-btn:focus {
        outline: 3px solid rgba(212, 175, 55, 0.8);
        outline-offset: 2px;
    }
    
    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* ===== GAMEPLAY PAGE STYLES ===== */
.content-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding-top: 120px;
    position: relative;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.page-title {
    font-size: 3rem;
    font-weight: bold;
    color: #d4af37;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.content-sections {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.content-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2.5rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: 2rem;
    color: #d4af37;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: bold;
}

.section-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Concept Grid */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.concept-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.concept-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.concept-card h3 {
    color: #d4af37;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.concept-card p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Flow Steps */
.flow-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 4px solid #d4af37;
}

.step-number {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a1a;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.step-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Rules Grid */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.rule-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.rule-item h3 {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.rule-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rule-item li {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding-left: 1.5rem;
}

.rule-item li:last-child {
    border-bottom: none;
}

.rule-item li::before {
    content: "✓";
    color: #d4af37;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Reward System */
.reward-system {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.reward-tier {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tier-header h3 {
    color: #d4af37;
    font-size: 1.3rem;
    margin: 0;
    font-weight: bold;
}

.tier-badge {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a1a;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.tier-rewards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.reward-icon {
    font-size: 1.5rem;
}

.reward-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.streak-bonus {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-top: 1rem;
}

.streak-bonus h3 {
    color: #d4af37;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: bold;
}

.streak-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.streak-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 4px solid #d4af37;
}

.streak-count {
    color: #d4af37;
    font-weight: bold;
    font-size: 1.1rem;
}

.streak-reward {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Participation Steps */
.participation-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.participation-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: transform 0.3s ease;
}

.participation-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.participation-card h3 {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.participation-card p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.faq-item h3 {
    color: #d4af37;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.faq-item p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.6;
}

/* Contact Info */
.contact-info {
    text-align: center;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.contact-method-icon {
    width: 24px;
    height: 24px;
    font-size: 1.2rem;
}

.cta-section {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.cta-section h3 {
    color: #d4af37;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a1a;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .content-page {
        padding-top: 100px;
    }
    
    .page-container {
        padding: 0 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .concept-grid {
        grid-template-columns: 1fr;
    }
    
    .flow-step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .tier-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .tier-rewards {
        grid-template-columns: 1fr;
    }
    
    .streak-levels {
        grid-template-columns: 1fr;
    }
    
    .participation-steps {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .contact-method {
        width: 100%;
        max-width: 280px;
        justify-content: flex-start;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .contact-method-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    
    .contact-method span {
        word-break: break-all;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .contact-method {
        max-width: 260px;
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
    
    .contact-method-icon {
        width: 18px;
        height: 18px;
    }
    
    .cta-section {
        padding: 1.5rem;
    }
    
    .cta-section h3 {
        font-size: 1.2rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    }
    
    .concept-card,
    .participation-card,
    .rule-item,
    .reward-tier,
    .faq-item {
        padding: 1.5rem;
    }
}

/* Match Application Form - Mobile Responsive */
@media (max-width: 768px) {
    .match-application-section {
        padding: 2rem 1rem;
    }
    
    .match-application-section .form-container {
        padding: 1.5rem;
    }
    
    /* Form header - ensure proper mobile layout */
    .match-application-section .form-header {
        text-align: center !important;
        margin-bottom: 1.5rem !important;
        display: block !important;
    }
    
    .match-application-section .form-header h2 {
        font-size: 1.5rem !important;
        display: block !important;
        text-align: center !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.4 !important;
        width: 100% !important;
    }
    
    .match-application-section .form-header h2 i {
        display: inline-block !important;
        margin-right: 0.3rem !important;
        vertical-align: middle !important;
    }
    
    .match-application-section .form-header p {
        display: block !important;
        text-align: center !important;
        margin-top: 0 !important;
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        color: #666 !important;
        width: 100% !important;
    }
    
    /* Form sections - better mobile layout */
    .match-form .form-section {
        margin-bottom: 1.5rem !important;
        padding-bottom: 1.2rem !important;
    }
    
    .match-form .form-section h3 {
        font-size: 1.2rem !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Input groups - full width on mobile */
    .match-form .input-group {
        margin-bottom: 1rem !important;
    }
    
    .match-form .input-group label {
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .date-time-container {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }
    
    .time-inputs {
        display: flex !important;
        gap: 0.8rem !important;
        flex-wrap: wrap !important;
    }
    
    .time-inputs .input-group {
        flex: 0 1 auto !important;
    }
    
    /* Date and time inputs - shorter on mobile */
    .match-form .input-group input[type="date"] {
        max-width: 200px !important;
        width: auto !important;
    }
    
    .match-form .input-group input[type="time"] {
        max-width: 150px !important;
        width: auto !important;
    }
    
    /* Override inline styles for date/time inputs */
    .match-form input[type="date"],
    .match-form input[type="time"],
    #match-date,
    #start-time,
    #end-time {
        max-width: 200px !important;
        width: auto !important;
    }
    
    .match-form input[type="time"],
    #start-time,
    #end-time {
        max-width: 150px !important;
    }
    
    .game-type-container {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Service selection - stack vertically on mobile */
    .service-selection {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Counter container - better mobile layout */
    .counter-container {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.8rem !important;
        margin-top: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
    
    .counter-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
    }
    
    .counter-display {
        font-size: 1.4rem !important;
        min-width: 40px !important;
        text-align: center !important;
        flex-shrink: 0 !important;
    }
    
    .service-options {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .service-card {
        padding: 1.5rem !important;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 1.5rem;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .match-application-section {
        padding: 1.5rem 0.5rem !important;
    }
    
    .match-application-section .form-container {
        padding: 1rem !important;
        border-radius: 10px !important;
    }
    
    /* Form header - ensure proper mobile layout */
    .match-application-section .form-header {
        text-align: center !important;
        margin-bottom: 1.2rem !important;
        display: block !important;
    }
    
    .match-application-section .form-header h2 {
        font-size: 1.3rem !important;
        display: block !important;
        text-align: center !important;
        margin-bottom: 0.6rem !important;
        line-height: 1.3 !important;
        width: 100% !important;
    }
    
    .match-application-section .form-header h2 i {
        display: inline-block !important;
        margin-right: 0.3rem !important;
        vertical-align: middle !important;
    }
    
    .match-application-section .form-header p {
        font-size: 0.9rem !important;
        display: block !important;
        text-align: center !important;
        margin-top: 0 !important;
        line-height: 1.4 !important;
        color: #666 !important;
        padding: 0 0.5rem !important;
        width: 100% !important;
    }
    
    /* Form sections - compact on small mobile */
    .match-form .form-section {
        margin-bottom: 1.2rem !important;
        padding-bottom: 1rem !important;
    }
    
    .match-form .form-section h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    /* Input fields - ensure proper sizing */
    .match-form .input-group {
        margin-bottom: 0.8rem !important;
    }
    
    .match-form .input-group label {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .match-form .input-group input,
    .match-form .input-group select,
    .match-form .input-group textarea {
        padding: 10px !important;
        font-size: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Date and time inputs - shorter on mobile */
    .match-form .input-group input[type="date"],
    .match-form .input-group input[type="time"],
    .match-form input[type="date"],
    .match-form input[type="time"],
    #match-date,
    #start-time,
    #end-time {
        max-width: 180px !important;
        width: auto !important;
    }
    
    /* Time inputs container - compact layout */
    .time-inputs {
        display: flex !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }
    
    .time-inputs .input-group,
    .time-inputs > div {
        flex: 0 1 auto !important;
        min-width: 0 !important;
    }
    
    /* Date time container - stack vertically on small mobile */
    .date-time-container,
    .match-form .form-section > div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    
    /* Counter container - compact on small mobile */
    .counter-container {
        gap: 0.6rem !important;
        justify-content: flex-start !important;
    }
    
    .counter-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
    }
    
    .counter-display {
        font-size: 1.2rem !important;
        min-width: 35px !important;
    }
    
    .match-form .submit-btn {
        padding: 12px !important;
        font-size: 1rem !important;
    }
    
    .service-card {
        padding: 1.2rem !important;
    }
    
    .service-icon {
        font-size: 2.5rem !important;
    }
    
    .service-card h4 {
        font-size: 1.3rem !important;
    }
    
    .modal-content {
        padding: 1rem !important;
        width: 98% !important;
    }
    
    .booking-summary {
        padding: 1rem !important;
    }
    
    .booking-status {
        padding: 1rem !important;
    }
}


/* Additional Mobile Responsive for Inline-Styled Form Elements */
@media (max-width: 768px) {
    /* Override inline grid styles for mobile */
    .match-form .form-section > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }
    
    /* Service grid mobile */
    .service-grid {
        grid-template-columns: 1fr !important;
        padding: 2rem 1rem !important;
        gap: 1.5rem !important;
    }
    
    /* Service box mobile */
    .service-box {
        padding: 1.5rem !important;
    }
    
    .service-box h3 {
        font-size: 1.5rem !important;
    }
    
    /* Hero section mobile */
    .fun-match-hero {
        padding: 2rem 1rem !important;
    }
    
    .fun-match-hero h1 {
        font-size: 1.8rem !important;
    }
    
    /* CTA section mobile */
    .cta-section {
        padding: 2rem 1rem !important;
    }
    
    .cta-section h2 {
        font-size: 1.5rem !important;
    }
    
    /* Contact buttons mobile */
    .contact-btn {
        display: block !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0.5rem auto !important;
    }
}

@media (max-width: 480px) {
    /* Hero section small mobile */
    .fun-match-hero h1 {
        font-size: 1.5rem !important;
    }
    
    .fun-match-hero p {
        font-size: 1rem !important;
    }
    
    /* Service box small mobile */
    .service-box {
        padding: 1.2rem !important;
    }
    
    .service-box h3 {
        font-size: 1.3rem !important;
    }
    
    /* Form container small mobile */
    .match-application-section .form-container {
        padding: 1rem !important;
        border-radius: 10px !important;
    }
    
    /* Form header small mobile */
    .match-application-section .form-header h2 {
        font-size: 1.3rem !important;
    }
    
    /* Form sections small mobile */
    .match-form .form-section {
        margin-bottom: 1.5rem !important;
        padding-bottom: 1rem !important;
    }
    
    .match-form .form-section h3 {
        font-size: 1.1rem !important;
    }
    
    /* Input fields small mobile */
    .match-form input,
    .match-form select,
    .match-form textarea {
        font-size: 16px !important;
        padding: 10px !important;
    }
    
    /* Submit button small mobile */
    .match-form button[type="submit"] {
        font-size: 1rem !important;
        padding: 12px !important;
    }
    
    /* Contact buttons small mobile */
    .contact-btn {
        font-size: 1rem !important;
        padding: 0.8rem 1.5rem !important;
    }
    
    /* CTA section small mobile */
    .cta-section h2 {
        font-size: 1.3rem !important;
    }
    
    .cta-section p {
        font-size: 0.95rem !important;
    }
}
