/* style.css - Royal Deep Blue & Rich Gold Theme */
:root {
    /* Base Colors - Deep, Secure Blues */
    --bg-color: #050E18; /* Very Dark Navy Blue (Deep Space) */
    --surface-color: #0F1A28; /* Darker Blue-Grey (Main Content Surfaces) */
    --primary-text-color: #E6F0F7; /* Soft Off-White/Light Blue (Digital Clarity) */
    --secondary-text-color: #9AB0C4; /* Muted Grey-Blue (Subtle Interface Text) */

    /* Accent Palette - Rich Golden Tones */
    --accent-primary: #B8860B; /* DarkGoldenrod - A deeper, richer gold */
    --accent-deep: #8B6D21; /* Even deeper, slightly bronzed gold */
    --accent-light: #FFD700; /* Pure Gold - For bright highlights and vibrant accents */
    --accent-speed-gold: #FFC107; /* A slightly more vibrant gold for dynamic elements, but still rich */

    /* Speed & Energy Accent (Now Rich Golden) */
    --accent-speed: var(--accent-speed-gold); /* Golden for loaders and speed indicators */

    /* Neutral Accents (used within the dark background for layers) */
    --accent-secondary: #1C2B3F; /* Slightly Lighter Dark Blue (Component Backgrounds) */
    --accent-secondary-deep: #2A3C52; /* Even Lighter Dark Blue */
    --accent-secondary-light: #0B141E; /* Slightly darker than surface-color for subtle depth */

    /* Subdued Colors for Hover & Active States (Now Rich Golden with transparency) */
    --hover-start: rgba(184, 134, 11, 0.1); /* Rich Golden with transparency */
    --hover-end: rgba(139, 109, 33, 0.08);     /* Deep Golden with transparency */
    --active-bg: rgba(139, 109, 33, 0.15); /* Deep Golden for active state */

    /* Glows & Accents - Rich Golden Glows */
    --subtle-glow: rgba(184, 134, 11, 0.15); /* Subtle Rich Golden glow */
    --subtle-deep-glow: rgba(139, 109, 33, 0.1); /* Even more subtle deep Rich Golden glow */
    --electric-glow: rgba(255, 193, 7, 0.2); /* Vibrant Golden glow (from accent-speed-gold) */

    /* Complementary & Status Accents (Gold now primary, others adjusted) */
    --complementary-accent: var(--accent-light); /* Ensuring VIP gold matches the brightest gold */
    --accent-success: var(--accent-primary); /* Use Rich Gold for success */
    --accent-error: #DE6D6D;      /* Softened Red for errors */
    --accent-loading: #7F8C8D;     /* Muted grey for loading states */

    /* Specific Red for Notice Box */
    --notice-red: #DE6D6D; /* Using the same softened red for consistency */

    --accent-notice-bg: rgba(184, 134, 11, 0.05); /* Very light Rich Golden tint notice background (KEPT GOLDEN) */
    --accent-notice-border: var(--accent-primary); /* DEPRECATED: Now handled directly for notice-box and client-app-box */
    --accent-notice-accent: var(--accent-primary); /* DEPRECATED: Now handled directly for notice-box and client-app-box */

    /* Gradients for dynamic elements (Now Rich Golden) */
    --button-gradient-default: linear-gradient(140deg, var(--accent-secondary-light) 0%, var(--accent-secondary) 100%);
    --button-gradient-hover: linear-gradient(140deg, var(--accent-light) 0%, var(--accent-primary) 100%);

    /* Speed Meter Button Specifics (Now Rich Golden) */
    --speed-button-bg: var(--accent-secondary-light);
    --speed-button-border: rgba(184, 134, 11, 0.3);
    --speed-button-glow: var(--subtle-glow);

    /* Key Button Specifics - Golden gradient */
    --key-gradient-core: linear-gradient(140deg, var(--accent-primary) 0%, var(--accent-light) 100%);
    --key-gradient-aura: radial-gradient(circle, var(--subtle-glow) 0%, var(--subtle-deep-glow) 50%, transparent 100%);

    /* General Borders & Glows */
    --border-color-subtle: #4F6A82; /* Darker blue-grey for general borders */
    --glow-color-soft: var(--subtle-glow);
    --glow-color-intense: rgba(184, 134, 11, 0.6); /* Brighter Rich Golden glow for intensity */

    /* Text color for button hover - ensures visibility and is always bright off-white */
    --button-hover-text-color: var(--primary-text-color); /* Soft Off-White */

    /* Layout (No Change) */
    --header-height: 80px;
    --footer-height: 85px;
}

html, body {
    height: 100%; margin: 0; padding: 0; overflow: hidden;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color); /* Very Dark Navy Blue Background */
    color: var(--primary-text-color); /* Soft Off-White Text */
    font-size: 16px; /* Base font size */
}

/* --- HEADER DESIGN --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
    background: rgba(5, 14, 24, 0.95); /* Semi-transparent deep navy header */
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    flex-direction: column; /* Stacks children vertically: logo/slogan block, then language switcher */
    align-items: center; /* Centers items horizontally within the flex column (logo/slogan) */
    justify-content: center; /* Vertically centers content within the header height */
    border-bottom: 1px solid var(--accent-primary); /* Rich Golden border */
    box-sizing: border-box;
    box-shadow: 0 5px 20px var(--subtle-glow); /* Rich Golden glow */
    animation: headerPulseGold 3s infinite ease-in-out alternate; /* Animation name for Gold */
}

/* Removed .header-top-bar and .header-spacer as they are no longer needed for this layout */

.header-content {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 0px;
    /* No flex-grow needed here as it will naturally center due to parent flex settings */
}
header h1 {
    font-size: 1.125rem;
    font-weight: 700; margin: 0;
    color: var(--accent-light); /* Brightest Gold for header text */
    text-shadow: 0 0 10px var(--accent-primary), 0 0 20px var(--accent-light); /* Rich Golden text shadow */
    letter-spacing: 3px;
    font-family: 'Inter', sans-serif;
}
header p {
    font-size: 0.875rem;
    color: var(--secondary-text-color); margin: 0;
    text-shadow: 0 0 3px rgba(184, 134, 11, 0.08); /* Subtle Rich Golden text shadow */
    font-style: italic; margin-bottom: 10px;
}
.slogan { font-size: 0.775rem; }

/* Keep original .header-logo styles for the actual logo image */
.header-logo {
    max-height: 50px; /* Original max height */
    width: auto;
    filter: drop-shadow(0 0 10px var(--accent-primary)); /* Original rich golden drop shadow */
    margin-top: 10px; /* Original margin */
    opacity: 0.9;
}
/* Updated Header Pulse Keyframes for Royal Gold Theme */
@keyframes headerPulseGold {
    0% { box-shadow: 0 5px 20px var(--subtle-glow); }
    100% { box-shadow: 0 5px 30px rgba(184, 134, 11, 0.25); } /* Stronger Rich Golden glow */
}

/* Language Switcher with Flags - ABSOLUTELY POSITIONED TO TOP-RIGHT */
.language-switcher {
    position: absolute; /* Positioned relative to the 'header' */
    top: 10px; /* Distance from the top of the header */
    right: 10px; /* Distance from the right of the header */
    display: flex;
    gap: 5px; /* Space between flag buttons */
    background-color: var(--surface-color); /* Background for the switcher */
    border-radius: 8px;
    padding: 3px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color-subtle);
    z-index: 101; /* Ensure it's above other header content if needed */
}

.lang-form {
    display: flex;
    gap: 5px;
}

.lang-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; /* Adjust flag button width */
    height: 20px; /* Adjust flag button height */
    overflow: hidden; /* Ensure flag doesn't overflow button */
    border: 1px solid transparent; /* Default transparent border */
}

.lang-button:hover {
    opacity: 1;
    transform: scale(1.05);
    background-color: var(--accent-secondary-deep); /* Subtle highlight on hover */
    border-color: var(--accent-primary); /* Gold border on hover */
}

.lang-button.active {
    opacity: 1;
    border: 1px solid var(--accent-light); /* Brighter gold border for active */
    box-shadow: 0 0 5px var(--accent-light); /* Glow for active */
    background-color: var(--accent-secondary);
}

/* Flag Icon Styling */
.fi {
    font-size: 20px; /* Adjust size of the flag */
    line-height: 1;
    border-radius: 2px; /* Slightly rounded corners for flags */
}


/* --- MAIN CONTENT & LOADER --- */
.scrollable-content {
    height: 100vh; overflow-y: auto; box-sizing: border-box; text-align: center;
    padding: var(--header-height) 20px var(--footer-height) 20px;
    background-color: var(--surface-color); /* Darker Blue-Grey content area */
}
.content-wrapper {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    max-width: 420px; margin: 0 auto;
}
.content-area { margin-top: 0px; width: 100%; margin-bottom: 0px; }
#default-message { color: var(--secondary-text-color); font-size: 0.875rem; }
.loader { display: none; justify-content: center; gap: 8px; margin: 20px 0; }
.loader > div {
    width: 9px; height: 9px; background-color: var(--accent-speed); /* Rich Golden loader */
    border-radius: 50%; animation: pulse 1.4s infinite ease-in-out both;
    box-shadow: 0 0 6px var(--accent-speed); /* Rich Golden glow */
}
.loader .dot1 { animation-delay: -0.32s; }
.loader .dot2 { animation-delay: -0.16s; }
@keyframes pulse { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1.0); opacity: 0.8; } }

#result-container {
    display: none; text-align: left; animation: fadeIn 0.5s ease;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--secondary-text-color);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#result-container b { color: var(--primary-text-color); font-weight: 600; }
#result-container a { color: var(--accent-primary); text-decoration: none; font-weight: 600; transition: color 0.2s ease; cursor: pointer; }
#result-container a:hover { color: var(--accent-light); }
#result-container code {
    display: block; background: var(--accent-secondary); /* Dark Blue for code blocks */
    padding: 14px; border-radius: 8px; margin-top: 0px;
    font-family: 'SF Mono', 'Menlo', 'Monaco', monospace; word-break: break-all; cursor: pointer;
    border: 1px solid var(--border-color-subtle); font-size: 0.875rem;
    color: var(--primary-text-color);
    box-shadow: inset 0 0 6px rgba(184, 134, 11, 0.05); /* Subtle Rich Golden inset shadow */
}
.video-container {
    position: relative; overflow: hidden; width: 100%; padding-top: 56.25%;
    margin-bottom: 5px; border-radius: 12px;
    border: 2px solid var(--accent-primary); /* Rich Golden border */
    box-shadow: 0 0 15px var(--subtle-glow); /* Rich Golden video container shadow */
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

body.loading .scrollable-content { display: none; opacity: 0; pointer-events: none; }
body.loading #loader {
    display: flex; position: fixed; top: 30%; left: 50%;
    transform: translate(-50%, -50%); z-index: 9999;
}

/* --- FOOTER & BUTTONS --- */
.fixed-footer {
    position: fixed; bottom: 0; left: 0; width: 100%;
    min-height: var(--footer-height);
    background: rgba(5, 14, 24, 0.9); /* Semi-transparent deep navy footer */
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color-subtle);
    padding: 5px 10px calc(5px + env(safe-area-inset-bottom));
    box-sizing: border-box; z-index: 100;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    box-shadow: 0 0 25px var(--subtle-glow); /* Rich Golden footer shadow */
}
.footer-content-wrapper {
    display: flex; align-items: center; justify-content: space-around;
    width: 100%; max-width: 420px; margin: 0 auto;
}

/* General Button Styles */
.button, a.button {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-weight: 600; cursor: pointer; color: var(--primary-text-color); /* Default text color */
    transition: color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
    text-decoration: none; flex-grow: 1; padding: 10px 0;
    border-radius: 8px; background: var(--speed-button-bg); /* Darker background for buttons */
    border: 1px solid var(--speed-button-border); /* Rich Golden border */
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), inset 0 0 6px rgba(184, 134, 11, 0.05); /* Subtle Rich Golden inset shadow */
}
.button::before, a.button::before {
    content: ''; position: absolute; width: 80%; height: 3px;
    background: linear-gradient(90deg, transparent, rgba(184, 134, 11, 0.2), transparent); /* Rich Golden indicator */
    bottom: 5px; border-radius: 2px;
    animation: indicatorPulseGold 2s infinite ease-in-out alternate; /* Animation name for Gold */
    opacity: 0.6;
}
/* Updated Indicator Pulse Keyframes for Royal Gold Theme */
@keyframes indicatorPulseGold {
    0% { transform: scaleX(0.7); opacity: 0.6; }
    100% { transform: scaleX(0.9); opacity: 0.8; }
}
.button:active, a.button:active {
    transform: scale(0.96);
    background-color: var(--active-bg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), inset 0 0 3px var(--subtle-glow);
    color: var(--button-hover-text-color) !important; /* Ensure text visible on active */
}
.button:hover, a.button:hover {
    background: var(--button-gradient-hover);
    box-shadow: 0 0 8px var(--subtle-glow), 0 0 12px var(--subtle-glow); /* Rich Golden hover glow */
    border-color: var(--accent-light);
    transform: translateY(-1px); z-index: 1;
    color: var(--button-hover-text-color) !important; /* !! MATCH TEXT COLOR ON HOVER !! */
}
.button:hover::after, a.button:hover::after {
    content: ''; position: absolute; width: 3px; height: 80%;
    background: rgba(184, 134, 11, 0.5); border-radius: 1px; /* Rich Golden needle */
    top: 10%; left: 5%; transform: translateX(-50%);
    animation: needleSweep 0.6s ease-out forwards;
    box-shadow: 0 0 4px rgba(184, 134, 11, 0.4); /* Rich Golden shadow */
    opacity: 0;
}
a.button:hover, a.button:visited:hover { color: var(--button-hover-text-color) !important; }
@keyframes needleSweep {
    0% { left: 5%; opacity: 0; }
    50% { opacity: 0.8; }
    100% { left: 95%; opacity: 0; }
}
.button:hover svg { filter: drop-shadow(0 0 4px rgba(184, 134, 11, 0.5)); color: var(--accent-light); } /* Lighter Rich Golden icon on hover */

.footer-small-button { min-width: 70px; flex-shrink: 0; margin: 0 5px; height: 40px; gap: 2px; }
.footer-small-button svg { width: 20px; height: 20px; color: var(--primary-text-color); }
.footer-small-button span { font-size: 0.75rem; font-weight: 500; color: var(--primary-text-color); }
.footer-small-button:hover span, .footer-small-button:active span { color: var(--button-hover-text-color) !important; }

/* Large "Get Key" Button */
.large-key-button {
    min-width: 140px; height: 60px; border-radius: 12px;
    background: var(--key-gradient-core); /* Rich Golden gradient */
    color: var(--primary-text-color); border: 2px solid var(--accent-deep); /* Deeper Rich Golden border */
    box-shadow: 0 0 15px var(--subtle-glow), 0 0 25px var(--subtle-deep-glow); /* Rich Golden glow */
    transition: transform 0.4s ease, box-shadow 0.5s ease, border-color 0.5s ease, background 0.5s ease;
    position: relative; z-index: 2; overflow: hidden;
}
.large-key-button::before {
    content: ''; position: absolute; width: 90%; height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    bottom: 8px; border-radius: 3px;
    animation: indicatorPulseGold 2s infinite ease-in-out alternate; /* Animation name for Gold */
    opacity: 0.7;
}
.large-key-button:hover {
    transform: translateY(-2px); background: var(--button-gradient-hover); /* Rich Golden gradient on hover */
    box-shadow: 0 0 20px var(--subtle-glow), 0 0 35px var(--subtle-deep-glow); /* Stronger Rich Golden hover glow */
    border-color: var(--accent-light); /* Lighter Rich Golden border on hover */
    color: var(--button-hover-text-color) !important; /* !! MATCH TEXT COLOR ON HOVER !! */
}
.large-key-button:hover::after {
    content: ''; position: absolute; width: 4px; height: 90%;
    background: rgba(255, 255, 255, 0.7); border-radius: 2px;
    top: 5%; left: 5%; transform: translateX(-50%);
    animation: needleSweep 0.5s ease-out forwards;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    opacity: 0;
}
.large-key-button:active {
    transform: scale(0.97); background-color: var(--active-bg);
    box-shadow: 0 0 10px var(--accent-deep);
}
.large-key-button svg {
    width: 35px; height: 35px; margin-bottom: 2px;
    filter: drop-shadow(0 0 8px rgba(184, 134, 11, 0.5)); color: var(--primary-text-color); /* Rich Golden drop shadow for SVG */
}
.button-text-key {
    font-size: 0.875rem;
    font-weight: 800; color: var(--primary-text-color);
    letter-spacing: 0.7px; text-transform: uppercase; font-family: 'Inter', sans-serif;
}
.large-key-button:hover .button-text-key, .large-key-button:active .button-text-key { color: var(--button-hover-text-color) !important; }

/* --- TOAST NOTIFICATION --- */
#toast-notification {
    visibility: hidden; position: fixed; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--accent-secondary-deep);
    color: var(--primary-text-color);
    padding: 12px 20px; border-radius: 8px; z-index: 200;
    opacity: 0; transition: opacity 0.4s, visibility 0.4s;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 0 15px var(--subtle-glow), 0 0 25px var(--subtle-deep-glow); /* Rich Golden glow */
    border: 1px solid var(--accent-primary); /* Rich Golden border */
}
#toast-notification.show { visibility: visible; opacity: 1; }

/* --- NO NEED TO CHANGE (except for red cross/close button) --- */
.sticky-ad-container {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%); z-index: 1000;
    background-color: var(--accent-secondary); /* Dark Blue for pop-up */
    border: 1px solid var(--accent-primary); /* Rich Golden border */
    box-shadow: 0 0 20px var(--subtle-glow), 0 0 40px rgba(184, 134, 11, 0.15); /* Rich Golden shadow */
    max-width: 90%; width: 320px; text-align: center;
    box-sizing: border-box; overflow: hidden;
    display: none; opacity: 0;
    transition: opacity 0.4s ease-out;
    will-change: transform, opacity;
}
.sticky-ad-container.show-sticky { display: block; opacity: 1; }
.sticky-ad-close-button {
    position: absolute; top: 10px; right: 10px;
    background-color: #DE6D6D; /* Softened Red */
    color: white; border: 1px solid #B05252; /* Darker Softened Red */
    border-radius: 50%; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    font-weight: bold; cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.sticky-ad-close-button:hover {
    background-color: #B05252; transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.sticky-ad-close-button:active {
    background-color: #8C4040; transform: scale(0.95);
}
.sticky-ad-content {
    margin-top: 10px; color: var(--primary-text-color); font-size: 0.9375rem;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.sticky-ad-content img, .sticky-ad-content iframe, .sticky-ad-content video {
    display: block; margin-left: auto; margin-right: auto;
}

.sticky-ad-countdown {
  /* Positioning within the parent ad container */
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;

  /* Size and Shape */
  width: 30px;
  height: 30px;
  border-radius: 50%; /* This makes it a perfect circle */

  /* Colors and Font */
  background-color: red; /* Semi-transparent black background */
  color: white;
  font-size: 18px;
  font-weight: bold;

  /* Flexbox to perfectly center the number inside the circle */
  /* Your JS already sets display:flex, but it's good practice to have it here too */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Initial state for the animation (hidden) */
  opacity: 0;
  transform: scale(0.5); /* Start smaller for a "pop-in" effect */
  
  /* Smooth transition for when the '.show' class is added */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/*
 * This is the visible state, triggered when your JavaScript adds the 'show' class.
 */
.sticky-ad-countdown.show {
  opacity: 1;
  transform: scale(1); /* Animate to full size */
}

/* --- NOTICE BOX (UPDATED TO RED BORDER/ICON) --- */
.notice-box {
    display: flex; align-items: center; gap: 15px;
    background: var(--accent-notice-bg); /* Still light golden tint background */
    border: 1px solid var(--notice-red); /* RED border */
    border-left: 4px solid var(--notice-red); /* RED accent border */
    border-radius: 8px; padding: 15px;
    margin-top: 10px; width: 100%; box-sizing: border-box;
    color: var(--primary-text-color); font-size: 0.8375rem;
    font-weight: 600;
    text-align: left; box-shadow: 0 4px 15px rgba(184, 134, 11, 0.1); /* Subtle Rich Golden shadow */
    animation: fadeIn 0.5s ease;
}
.notice-box svg {
    flex-shrink: 0; color: var(--notice-red); /* RED icon */
    filter: drop-shadow(0 0 3px var(--notice-red)); /* RED glow */
}
.notice-box a {
    color: var(--accent-primary); /* Rich Golden link text */
    font-weight: 700; text-decoration: none;
    border-bottom: 1px dotted var(--accent-primary); /* Rich Golden dotted border */
}
.notice-box a:hover {
    color: var(--accent-light); border-bottom-style: solid; /* Lighter Rich Golden on hover */
    border-bottom-color: var(--accent-light);
}

/* --- Client App BOX (UPDATED TO GREY BORDER) --- */
.client-app-box {
    display: flex; align-items: center; gap: 1px;
    background: var(--accent-secondary); /* Changed to neutral dark blue background */
    border: 1px solid var(--border-color-subtle); /* GREY border */
    border-left: 4px solid var(--border-color-subtle); /* GREY accent border */
    border-radius: 8px; padding: 1px;
    margin-top: 0px; width: 100%; box-sizing: border-box;
    color: var(--primary-text-color); font-size: 0.9375rem;
    font-weight: 600;
    text-align: left; box-shadow: 0 4px 15px rgba(79, 106, 130, 0.1); /* Subtle GREY shadow */
    animation: fadeIn 0.5s ease;
}
.client-app-box a {
    color: var(--accent-primary); /* Rich Golden link text (KEPT GOLDEN) */
    font-weight: 700; text-decoration: none;
    border-bottom: 1px dotted var(--accent-primary); /* Rich Golden dotted border (KEPT GOLDEN) */
}

/* --- SERVER LIST --- */
.server-list-container { width: 100%; margin-top: 10px; text-align: left; }
.country-group {
    background: var(--accent-secondary); /* Slightly Lighter Dark Blue for groups */
    border: 1px solid var(--border-color-subtle);
    margin-bottom: 5px; border-radius: 10px; overflow: hidden;
    box-shadow: inset 0 0 6px rgba(184, 134, 11, 0.03), 0 2px 4px rgba(0, 0, 0, 0.05); /* Subtle Rich Golden inset shadow */
}
.country-header {
    background: var(--accent-secondary-deep); /* Even Lighter Dark Blue for header */
    padding: 6px 18px; cursor: pointer; display: flex;
    justify-content: space-between; align-items: center;
    font-weight: 700; color: var(--primary-text-color);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color-subtle);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.country-header:hover {
    background: var(--accent-secondary); /* Slightly Lighter Dark Blue on hover */
    box-shadow: 0 0 8px var(--subtle-glow); /* Rich Golden glow */
    color: var(--button-hover-text-color); /* !! MATCH TEXT COLOR ON HOVER !! */
}
.country-flag {
    margin-right: 10px; vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.05); /* Very light border */
    border-radius: 3px; box-shadow: 0 0 3px rgba(0, 0, 0, 0.03);
}
.country-name { flex-grow: 1; font-size: 1rem; letter-spacing: 0.8px; }
.toggle-icon {
    font-size: 1.3em; margin-left: 12px;
    color: var(--accent-primary); /* Rich Golden toggle icon */
    transition: transform 0.3s ease, color 0.3s ease;
}
.country-header[aria-expanded="true"] .toggle-icon { transform: rotate(180deg); }
.country-servers {
    padding: 0px 15px;
    background-color: var(--accent-secondary-light); /* Slightly darker than surface-color for server items */
}
.server-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05); /* Very subtle dashed line */
}
.server-item:last-child { border-bottom: none; }
.server-details { display: flex; align-items: center; gap: 0px; flex-grow: 1; }
.server-name {
    margin-right: 10px; font-size: 0.9375rem; color: var(--primary-text-color);
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}
.server-actions { display: flex; align-items: center; }
.server-stats {
    margin-right: 8px; display: flex;
    align-items: center; gap: 4px;
}

/* --- ONLINE COUNT --- */
.online-count {
    color: var(--primary-text-color);
    padding: 3px 8px;
    border-radius: 12px;
    width: 20px;
    font-size: 0.875rem;
    visibility: hidden;
    line-height: 1;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.online-count.success { background-color: var(--accent-success); } /* Now Rich Golden */
.online-count.error { background-color: var(--accent-error); }
.online-count.loading { background-color: var(--accent-loading); }

.generate-form { margin: 0; }

.vip-server {
    display: inline-block;
    color: var(--complementary-accent); /* Ensuring VIP gold matches the brightest gold */
    padding: 2px 5px;
    border-radius: 8px;
    font-size: 1.6em;
    font-weight: 900;
    text-transform: uppercase;
}
.button.generate-button {
    padding: 8px 15px; font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 8px;
    background: var(--speed-button-bg);
    border: 1px solid var(--speed-button-border); /* Rich Golden Border */
    box-shadow: inset 0 0 4px rgba(184, 134, 11, 0.05), 0 2px 3px rgba(0, 0, 0, 0.1); /* Subtle Rich Golden inset shadow */
    color: var(--primary-text-color);
    min-width: 50px;
    height: auto;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.button.generate-button:not(:disabled):hover {
    background: var(--button-gradient-hover); /* Rich Golden gradient */
    border-color: var(--accent-light); /* Lighter Rich Golden border */
    transform: translateY(0px);
    box-shadow: 0 0 8px var(--subtle-glow), inset 0 0 5px rgba(184, 134, 11, 0.15); /* Rich Golden glow */
    color: var(--button-hover-text-color) !important; /* !! MATCH TEXT COLOR ON HOVER !! */
}

.button.generate-button:active {
    transform: scale(0.97);
    background-color: var(--active-bg); /* Rich Golden active background */
    box-shadow: inset 0 0 5px var(--accent-deep), 0 1px 2px rgba(0,0,0,0.2);
    border-color: var(--accent-deep); /* Deeper Rich Golden border */
}

.button.generate-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--accent-error) !important;
    border-color: #B05252;
    box-shadow: none;
    transform: none;
}

/* --- Duo-Glow Plan Comparison Design --- */
.duo-glow-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    margin: 10px auto;
    border: 1px solid var(--accent-primary); /* Rich Golden border */
    border-radius: 12px;
    overflow: hidden;
    background: var(--accent-secondary); /* Dark Blue for container */
    box-shadow: 0 0 20px var(--subtle-glow), inset 0 0 8px var(--subtle-deep-glow); /* Rich Golden glow */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--primary-text-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.duo-glow-header-row,
.duo-glow-feature-row {
    display: flex;
    flex-shrink: 0;
    min-width: 300px;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color-subtle);
}
.duo-glow-feature-row:last-child {
    border-bottom: none;
}
.feature-icon {
    width: 35px;
    height: 35px;
    margin-top: 2px;
    margin-bottom: 2px;
    border-radius: 10px;
    vertical-align: middle;
    padding: 3px;
}
.duo-glow-header-row {
    background: var(--accent-secondary-deep); /* Even Lighter Dark Blue for header */
    font-weight: 700;
    font-size: 1.1em;
    color: var(--primary-text-color);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--accent-primary); /* Rich Golden border */
    padding: 0;
}

.duo-glow-header-cell {
    flex: 1;
    min-width: 150px;
    padding: 15px 10px;
    text-align: center;
    border-right: 1px solid var(--border-color-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.duo-glow-header-cell:last-child {
    border-right: none;
}

.premium-header {
    background: linear-gradient(140deg, var(--accent-primary), var(--accent-light)); /* Rich Golden gradient */
    color: var(--primary-text-color);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.4), 0 0 15px var(--subtle-glow); /* Rich Golden text shadow */
}

.duo-glow-data-cell {
    flex: 1;
    min-width: 150px;
    padding: 15px 10px;
    text-align: center;
    border-right: 1px solid var(--border-color-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background-color: var(--accent-secondary-light); /* Slightly darker than surface-color for consistent dark blue */
}

.duo-glow-data-cell:last-child {
    border-right: none;
}

.premium-data {
    background-color: rgba(184, 134, 11, 0.05); /* Light Rich Golden tint for premium data */
    font-weight: 600;
    color: var(--accent-primary); /* Rich Golden data text */
    text-shadow: 0 0 3px rgba(184, 134, 11, 0.1); /* Rich Golden text shadow */
}

.duo-glow-price-row {
    background-color: transparent;
    border-top: 1px solid var(--border-color-subtle);
}

.free-data {
    color: var(--primary-text-color);
}

.premium-price {
    background: var(--key-gradient-core); /* Rich Golden gradient */
    color: var(--primary-text-color);
    font-size: 1rem;
    text-shadow: 0 0 15px var(--accent-light), 0 0 25px var(--accent-secondary-light); /* Rich Golden text shadow */
}

hr {
    border: none;
    border-top: 1px dashed var(--accent-primary); /* Rich Golden dashed line */
    color: var(--subtle-glow); /* Rich Golden color */
    background-color: transparent;
    height: 1px;
    margin-top: 20px;
    margin-bottom: 10px;
    opacity: 0.4;
}
.premium-history-table-wrapper {
    border-radius: 0.5rem;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.08), 0 1px 3px -1px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--border-color-subtle);
    background-color: var(--accent-secondary); /* Dark Blue for table */
    box-shadow: 0 0 10px var(--subtle-glow), inset 0 0 4px var(--subtle-deep-glow); /* Rich Golden glow */
}

table.premium-history-table {
    width: 100%;
    border-collapse: collapse;
    background-color: transparent;
    color: var(--primary-text-color);
}

table.premium-history-table thead {
    background-color: var(--accent-secondary-deep); /* Even Lighter Dark Blue for header */
}

table.premium-history-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary-text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color-subtle);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
}

table.premium-history-table tbody {
    /* No direct background-color here, inherited from wrapper */
}

table.premium-history-table tbody tr {
    border-bottom: 1px solid var(--border-color-subtle);
}

table.premium-history-table tbody tr:hover {
    background-color: var(--accent-secondary-light); /* Slightly darker than surface-color on hover */
}

table.premium-history-table td {
    padding: 12px 16px;
    font-size: 0.8125rem;
    color: var(--primary-text-color);
}

table.premium-history-table td .text-green-600 {
    font-size: 0.875rem;
    font-weight: 600;
    color: green; /* Now Rich Golden */
    text-shadow: 0 0 2px rgba(184, 134, 11, 0.3); /* Rich Golden text shadow */
}

.server-stats {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 0.9em;
    font-weight: bold;
    color: var(--secondary-text-color);
}

.signal-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.signal-icon svg {
    width: 26px;
    height: 18px;
}

.signal-bar {
    opacity: 0.2;
    transition: opacity 0.5s ease-in-out;
}

.signal-bar.signal-bar-active {
    opacity: 0.8;
}

.error-cross-icon {
    display: block;
}

.generate-button.error-button {
    background-color: var(--accent-error) !important;
    cursor: not-allowed;
    opacity: 0.6;
}
    #maintenance-message {
        text-align: left;
    }
    #maintenance-message h1 {
        font-size: 1.2em; /* You can adjust this value */
    }
    #maintenance-message p {
        font-size: 0.9em; /* You can adjust this value */
        line-height: 1.6;
    }
/* --- Premium & Free Group Styling (Enhanced Layered Design) --- */

/* Base container for both Premium and Free main groups */
.main-server-group {
    border-radius: 12px;
    margin-bottom: 5px;
    overflow: hidden; /* Important for child border-radius */
    transition: all 0.4s ease;
}

/* Base style for the main group headers */
.main-group-header {
    padding: 15px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent; /* Base, will be overridden */
    position: relative; /* For pseudo-elements */
    overflow: hidden; /* For sheen effect */
}

.main-group-header .toggle-icon {
    font-size: 1.5em;
    transition: transform 0.3s ease, color 0.3s ease;
}

.main-group-content {
    padding: 8px; /* Standardized padding */
    transition: background-color 0.3s ease;
}


/* --- PREMIUM GROUP 👑 --- */
.premium-group {
    /* Create a gradient border using background-clip */
    border: 2px solid transparent;
    background: linear-gradient(var(--surface-color), var(--surface-color)) padding-box,
                linear-gradient(160deg, var(--accent-light), var(--accent-deep), var(--accent-primary)) border-box;
    /* Add a breathing glow animation */
    animation: premiumAura 4s infinite ease-in-out alternate;
}

@keyframes premiumAura {
    from {
        box-shadow: 0 0 25px var(--subtle-glow), 0 0 45px var(--subtle-deep-glow);
    }
    to {
        box-shadow: 0 0 35px var(--electric-glow), 0 0 60px var(--subtle-glow), inset 0 0 10px rgba(184, 134, 11, 0.05);
    }
}

.premium-group .main-group-header {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.2), rgba(139, 109, 33, 0.3));
    color: var(--accent-light);
    text-shadow: 0 0 10px var(--accent-primary);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3); /* Gold border-bottom */
}

/* Adds a subtle sheen/glint effect that slides across on hover */
.premium-group .main-group-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,215,0,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: left 0.7s ease-in-out;
}

.premium-group .main-group-header:hover::before {
    left: 130%;
}

.premium-group .main-group-header .toggle-icon {
    color: var(--accent-light);
    text-shadow: 0 0 5px var(--accent-light);
}

.premium-group .main-group-content {
    /* Different background for content area to create a layered effect */
    background-color: rgba(15, 26, 40, 0.5); 
}


/* --- FREE GROUP 🆓 --- */
.free-group {
    border: 1px solid var(--border-color-subtle);
    background-color: var(--accent-secondary);
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.2);
}

.free-group .main-group-header {
    background-color: var(--accent-secondary-deep);
    color: var(--primary-text-color);
    border-bottom: 1px solid var(--border-color-subtle);
}

.free-group .main-group-header:hover {
    background-color: #2A3C52;
    color: #FFF;
}

.free-group .main-group-header .toggle-icon {
    color: var(--secondary-text-color);
}

.free-group .main-group-content {
    /* Darker content area for depth, consistent with country list */
    background-color: var(--accent-secondary-light);
}
/* Styling for the new title/slogan wrapper */
.group-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligns text to the left */
    line-height: 1.2;
}

/* You can remove any specific margin/padding from .group-name if needed */
.main-group-header .group-name {
    margin: 0;
    padding: 0;
}

/* Styling for the new slogan text */
.group-slogan {
    font-size: 0.70rem; /* Smaller font size */
    font-weight: 400; /* Normal weight, not bold */
    text-transform: none; /* Slogan is not uppercase */
    letter-spacing: 0.5px;
    color: var(--secondary-text-color); /* Use muted color */
    margin-top: 4px; /* Space between title and slogan */
    font-style: italic;
    opacity: 0.8;
}

/* Give the premium slogan a distinct golden color */
.premium-group .group-slogan {
    color: var(--accent-primary);
    text-shadow: 0 0 5px var(--subtle-deep-glow);
}

/* Adjust nested country groups to fit the new design */
.main-group-content .country-group {
    margin-bottom: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Give nested groups a slight lift */
}
.main-group-content .country-group:last-child {
    margin-bottom: 0;
}
/* --- Menu Page Styling --- */

.menu-container {
    display: flex;
    flex-direction: column;
    gap: 5px; /* Space between menu buttons */
    width: 100%;
    max-width: 420px;
    margin: 5px auto; /* Center the menu vertically */
}

.menu-button {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background-color: var(--accent-secondary);
    border: 1px solid var(--border-color-subtle);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1), inset 0 0 8px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.menu-button:hover {
    transform: translateY(0px);
    border-color: var(--accent-primary);
    background-color: var(--accent-secondary-deep);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15), 0 0 15px var(--subtle-glow);
}

.menu-button-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-secondary-light);
    border-radius: 10px;
    border: 1px solid var(--border-color-subtle);
    transition: all 0.3s ease;
}

.menu-button:hover .menu-button-icon {
    border-color: var(--accent-primary);
    background: var(--accent-secondary);
}

.menu-button-icon svg {
    width: 28px;
    height: 28px;
    color: var(--secondary-text-color);
    transition: all 0.3s ease;
}

.menu-button:hover .menu-button-icon svg {
    color: var(--accent-light);
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px var(--accent-light));
}

.menu-button-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.menu-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-text-color);
    transition: color 0.3s ease;
}

.menu-description {
    font-size: 0.75rem;
    color: var(--secondary-text-color);
    transition: color 0.3s ease;
}

.menu-button:hover .menu-title {
    color: var(--accent-light);
}

.menu-button:hover .menu-description {
    color: var(--primary-text-color);
}

/* Special styling for the Premium button */
.menu-button.premium-button {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.1), rgba(139, 109, 33, 0.2));
}

.menu-button.premium-button:hover {
    border-color: var(--accent-light);
    box-shadow: 0 6px 20px var(--subtle-glow), 0 0 25px var(--electric-glow);
}

.menu-button.premium-button .menu-button-icon {
    background-color: rgba(184, 134, 11, 0.2);
    border-color: rgba(184, 134, 11, 0.5);
}

.menu-button.premium-button .menu-button-icon svg {
    color: var(--accent-light);
}

.menu-button.premium-button .menu-title {
    color: var(--accent-light);
}
