/* Main Styles - Custom CSS */
:root {
    /* New Sci-Fi Inspired Palette */
    --primary-color: #00BFFF; /* DeepSkyBlue / Electric Blue */
    --primary-light: #7FFFD4; /* Aquamarine */
    --primary-dark: #008B8B; /* DarkCyan */
    --secondary-color: #FF00FF; /* Magenta / Vibrant Pink */
    --secondary-light: #FF77FF;
    --secondary-dark: #C71585; /* MediumVioletRed */

    --background-dark: #0D0F1A; /* Very Dark Blue */
    --background-medium: #1A1C2A; /* Dark Blue */
    --background-light: #2A2D3F; /* Lighter Dark Blue */
    --background-accent: #111321; /* Slightly lighter dark for backgrounds */


    --text-primary: #FFFFFF;
    --text-secondary: #B0C4DE; /* LightSteelBlue */
    --text-disabled: #6A738B;

    --error-color: #FF4136; /* Red */
    --success-color: #00FF7F; /* SpringGreen */
    --warning-color: #FFD700; /* Gold */
    --info-color: #7DF9FF; /* Electric Blue Light */
    --energy-color: #FFD700; /* Gold for Energy */

    --border-radius: 6px; /* Slightly smaller radius */
    --shadow-light: 0 2px 8px rgba(0, 191, 255, 0.15);
    --shadow-medium: 0 4px 15px rgba(0, 191, 255, 0.2);
    --shadow-dark: 0 8px 25px rgba(0, 191, 255, 0.25);
    --shadow-intense: 0 0 30px rgba(0, 191, 255, 0.5), 0 0 50px rgba(0, 191, 255, 0.3);


    --transition-fast: 0.15s ease-out;
    --transition-medium: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Font Face Rule --- */
/* Loads the main_font.woff2 file and defines the font-family 'MainGameFont' */
@font-face {
    font-family: 'MainGameFont';
    src: url('./assets/fonts/main_font.woff2') format('woff2'); /* Adjusted path based on dist folder */
    /* Add other formats if available (woff, ttf) for broader browser support */
    /* src: url('./assets/fonts/main_font.woff') format('woff'); */
    /* src: url('./assets/fonts/main_font.ttf') format('truetype'); */
    font-weight: normal;
    font-style: normal;
    /* Optional: font-display: swap; for better loading experience */
}


body {
    /* Original body styles - Tailwind classes in index.html will handle background, overflow, and base font */
    font-family: 'Roboto', 'Segoe UI', sans-serif; /* Modern font stack */
    line-height: 1.5;
    position: relative; /* Needed for pseudo-elements */
    /* Background animation is likely handled by bg.js or removed */
}

/* Standard heading styles */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', 'Segoe UI', sans-serif; /* Keep Orbitron for headings, add fallback */
    font-weight: 700;
    letter-spacing: 1.2px; /* Slightly increased spacing */
    color: var(--primary-light); /* Use light primary for headings */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Standard button styles */
button {
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    border: none;
    outline: none;
    transition: all var(--transition-medium); /* Slightly slower transition */
    border-radius: var(--border-radius);
    padding: 10px 20px;
    font-size: 16px;
    box-shadow: var(--shadow-light);
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: var(--shadow-medium), 0 0 15px var(--primary-light);
}

button:active:not(:disabled) {
    transform: translateY(0px);
    filter: brightness(0.95);
    box-shadow: var(--shadow-light), 0 0 5px var(--primary-color);
}

button:disabled {
    filter: grayscale(80%);
    opacity: 0.6; /* Increased opacity for visibility */
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Tailwind generated classes will handle most styling for .hidden and .screen.active */
.hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.screen.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}


/* Loading Screen - Redesigned (Standard CSS) */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--background-medium) 0%, var(--background-dark) 100%); /* Subtle gradient */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity var(--transition-slow) ease-out;
    /* Ensure position: relative for potential children z-index */
     position: relative;
     overflow: hidden; /* Hide particle canvas if it's a sibling */
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    width: 90%;
    max-width: 550px; /* Slightly wider */
    text-align: center;
    padding: 40px;
    background-color: rgba(13, 15, 26, 0.8); /* Dark semi-transparent background */
    border-radius: var(--border-radius);
    box-shadow: 0 0 30px rgba(0, 191, 255, 0.3); /* Primary color glow */
    border: 1px solid rgba(0, 191, 255, 0.2); /* Subtle border */
    position: relative; /* Needed for local z-index */
    z-index: 2; /* Above particle canvas if it's a sibling */
}

.logo-container {
    margin-bottom: 30px;
}

.logo {
    width: 200px; /* Slightly smaller logo */
    height: auto;
    filter: drop-shadow(0 0 10px var(--primary-color)); /* Logo glow */
}

.loading-bar-container { /* Renamed from progress-container */
    margin-bottom: 15px;
}

.loading-bar { /* Renamed from progress-bar */
    height: 8px; /* Thinner bar */
    background-color: rgba(255, 255, 255, 0.1); /* Darker background */
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light)); /* New gradient */
    border-radius: 4px;
    transition: width var(--transition-medium) ease-out;
    box-shadow: 0 0 8px var(--primary-light);
}

.loading-text-container { /* New container for text and percentage */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.loading-text {
    font-size: 16px;
    color: var(--text-secondary);
    font-family: 'Orbitron', sans-serif;
}

#loading-percentage { /* Style the percentage */
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-light);
    font-family: 'Orbitron', sans-serif;
}

.loading-tips { /* Renamed from loading-tip */
    margin-top: 20px;
    height: 2em; /* Reserve space for tip */
}

.tip { /* Style the tip text */
    font-style: italic;
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.8;
    transition: opacity var(--transition-medium);
}

/* Game Container */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* UI Overlay - General */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    color: var(--text-secondary);
}

#ui-overlay > * { /* Allow direct children to receive pointer events */
    pointer-events: auto;
}

/* Top Bar - Redesigned */
#top-bar {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align items to the top */
    gap: 20px;
    background-color: rgba(13, 15, 26, 0.6);
    padding: 10px 20px; /* Increased padding */
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 191, 255, 0.1);
    box-shadow: var(--shadow-medium);
}

#player-stats, #server-info {
    font-size: 14px;
    line-height: 1.4;
}

#player-stats div, #server-info div {
    margin-bottom: 4px;
}
#player-stats div:last-child, #server-info div:last-child {
    margin-bottom: 0;
}

#player-name-display {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
}

#score-value {
    font-weight: 700;
    color: var(--primary-light);
    font-size: 15px;
}

#player-rank {
    color: var(--text-secondary);
}

#server-name, #player-count, #ping {
    color: var(--text-secondary);
    text-align: right;
}

/* Leaderboard - Redesigned */
#leaderboard-button {
    position: absolute;
    top: 15px; /* Align with top bar */
    right: 15px; /* Position near server info */
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: rgba(13, 15, 26, 0.7);
    border: 1px solid rgba(0, 191, 255, 0.15);
    border-radius: 50%; /* Circular button */
    color: var(--primary-light);
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-light);
    z-index: 11; /* Above top-bar potentially */
    transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#leaderboard-button:hover {
    background-color: rgba(0, 191, 255, 0.2);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium), 0 0 10px rgba(0, 191, 255, 0.4);
}

#leaderboard-panel {
    position: absolute;
    top: 65px; /* Below button */
    right: 15px;
    width: 250px;
    max-height: 300px;
    background-color: rgba(13, 15, 26, 0.9); /* More opaque */
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 191, 255, 0.25);
    box-shadow: var(--shadow-medium);
    padding: 15px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition-medium), transform var(--transition-medium), visibility var(--transition-medium);
    z-index: 20;
}

#leaderboard-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#leaderboard-panel h3 {
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
    color: var(--primary-light);
}

.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-list li:last-child {
    border-bottom: none;
}

.leaderboard-list .rank {
    font-weight: 700;
    color: var(--primary-light);
    min-width: 25px;
}

.leaderboard-list .name {
    flex-grow: 1;
    margin: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.leaderboard-list .score {
    font-weight: 500;
    color: var(--secondary-light);
}

.leaderboard-list .is-player .name {
    color: var(--primary-light);
    font-weight: 700;
}

#leaderboard-panel .close-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    padding: 0 5px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

#leaderboard-panel .close-button:hover {
    color: var(--primary-light);
    transform: none; /* Override default button hover */
    filter: none;
    box-shadow: none;
}

/* Controls Container - Bottom Center */
#controls-container {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end; /* Align items to bottom */
    gap: 15px;
    background-color: rgba(13, 15, 26, 0.75);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow: var(--shadow-medium);
}

/* Ability Buttons - Redesigned */
#ability-buttons {
    display: flex;
    gap: 10px;
}

.ability-button {
    position: relative;
    width: 55px;
    height: 55px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 50%; /* Circular */
    color: var(--primary-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ability-button:hover:not(:disabled) {
    background-color: rgba(0, 191, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

.ability-button:disabled {
    filter: grayscale(80%);
    opacity: 0.6; /* Increased opacity for visibility */
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.ability-button img { /* Style for ability icons */
    width: 60%;
    height: 60%;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.5));
}

.ability-button .ability-icon {
    /* This class might be redundant if using img tags */
    font-size: 20px; /* Adjust icon size */
    line-height: 1;
    margin-bottom: 2px;
}

.ability-button-container { /* Added container for button and keybind */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.ability-keybind {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1px 4px;
    border-radius: 3px;
}


.ability-button .ability-name { /* Hide name by default */
    display: none;
}

.ability-button .ability-cooldown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%); /* Full initially */
    transition: clip-path 0.1s linear; /* Smooth cooldown transition */
    opacity: 0;
}

.ability-button.on-cooldown .ability-cooldown {
    opacity: 1;
}

/* Evolution & Energy Bars - Redesigned */
/* Health Bar styles were missing, added here */
#health-bar {
    display: flex;
    align-items: center;
    width: 150px; /* Fixed width */
    background-color: rgba(255, 0, 0, 0.1); /* Subtle red background */
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 0, 0.1);
    height: 10px;
    margin-bottom: 5px; /* Space below health bar if placed above evo/energy */
}

#health-bar .health-fill {
    height: 100%;
    width: 100%; /* Start full */
    background: linear-gradient(90deg, #FF4136, #E74C3C); /* Red gradient */
    border-radius: 4px;
    transition: width var(--transition-medium) ease-out;
    box-shadow: 0 0 6px #FF4136;
}

#health-bar .health-text {
     font-size: 12px;
     color: var(--text-primary); /* White text */
     font-family: 'Orbitron', sans-serif;
     margin-left: auto; /* Push text to the right */
     padding-right: 5px; /* Small padding */
     position: absolute; /* Position over the bar */
     right: 0;
     transform: translateX(100%); /* Move text off to the right slightly */
}


#evolution-indicator, #energy-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align text to the left */
    width: 150px; /* Fixed width */
    font-family: 'Orbitron', sans-serif;
}

.evolution-stage, .energy-label /* Add label for energy */ {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.evolution-progress-container, .energy-bar-container /* Add container for energy */ {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 191, 255, 0.1);
}

#evolution-indicator .evolution-fill {
    height: 100%;
    width: 0%; /* Start at 0 */
    border-radius: 4px;
    transition: width var(--transition-medium) ease-out;
    background: linear-gradient(90deg, var(--secondary-dark), var(--secondary-light));
    box-shadow: 0 0 6px var(--secondary-light);
}

#energy-bar .energy-fill {
    height: 100%;
    width: 0%; /* Start at 0 */
    border-radius: 4px;
    transition: width var(--transition-medium) ease-out;
    background: linear-gradient(90deg, #FFC107, var(--energy-color)); /* Gold/Yellow gradient */
    box-shadow: 0 0 6px var(--energy-color);
}

/* HUD Menu Buttons - Bottom Right */
#menu-buttons {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    flex-direction: column; /* Stack vertically */
    gap: 10px;
}

.hud-button {
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: rgba(13, 15, 26, 0.7);
    border: 1px solid rgba(0, 191, 255, 0.15);
    border-radius: 50%; /* Circular */
    color: var(--primary-light);
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-light);
    transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hud-button:hover {
    background-color: rgba(0, 191, 255, 0.2);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium), 0 0 10px rgba(0, 191, 255, 0.4);
}

/* Minimap - Bottom Left */
#minimap-container {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 160px; /* Slightly smaller */
    height: 160px;
    background-color: rgba(13, 15, 26, 0.75);
    border-radius: 50%; /* Circular container */
    border: 2px solid rgba(0, 191, 255, 0.25);
    box-shadow: var(--shadow-medium);
    overflow: hidden; /* Clip canvas to circle */
    padding: 5px; /* Padding around canvas */
}

#minimap {
    width: 100%;
    height: 100%;
    border-radius: 50%; /* Make canvas circular */
    background-color: rgba(0, 0, 0, 0.3); /* Darker background */
}

/* Chat Container - REMOVE LATER, hide for now */
#chat-container {
    display: none; /* Hide chat */
}

/* Notification Container - Bottom Left */
#notification-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    max-width: 300px;
    /* Animation is in animations.css or handled by JS, keep transitions for properties */
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1; /* Assume visible by default when added */
    pointer-events: auto; /* Allow interaction IF needed (e.g., dismiss), usually none */
    position: relative; /* For border-left */
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

.notification.info {
    border-left: 4px solid var(--info-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
    color: #333; /* Darker text for yellow warnings */
}

/* Main Menu - Redesigned (Standard CSS) */
#main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--background-medium) 0%, var(--background-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    position: relative; /* Needed for particle pseudo-element if re-added */
    overflow: hidden; /* Hide particle canvas if it's a sibling */
}


.menu-container {
    width: 90%;
    max-width: 500px;
    text-align: center;
    padding: 30px;
    background-color: rgba(13, 15, 26, 0.85); /* Darker semi-transparent background */
    border-radius: var(--border-radius);
    box-shadow: 0 0 40px rgba(0, 191, 255, 0.35); /* Enhanced glow */
    border: 1px solid rgba(0, 191, 255, 0.25);
    /* animation: scaleIn 0.5s var(--transition-medium) forwards; /* Add entry animation - Assuming handled by JS or Tailwind anim */
    position: relative; /* Needed for local z-index */
    z-index: 2; /* Above particles */
}

#main-menu .logo-container { /* Target logo container within main menu */
    margin-bottom: 25px;
}

#main-menu .logo { /* Target logo within main menu */
    width: 180px; /* Slightly smaller */
    height: auto;
    filter: drop-shadow(0 0 12px var(--primary-color));
}

.menu-content { /* Container for inputs and buttons */
    display: flex;
    flex-direction: column;
    gap: 20px; /* Consistent gap */
}

.player-setup {
    display: flex;
    gap: 10px;
    align-items: center;
}

#player-name {
    flex-grow: 1;
    padding: 12px 15px;
    font-size: 16px;
    border-radius: var(--border-radius);
    border: 1px solid var(--background-light);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit; /* Use body font */
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#player-name::placeholder {
    color: var(--text-disabled);
    opacity: 0.8;
}

#player-name:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 191, 255, 0.3);
}

.server-selection {
    margin-top: 10px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid var(--background-light);
}

.server-selection h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.server-list {
    max-height: 100px; /* Limit height if many servers */
    overflow-y: auto;
}

.server-option {
    padding: 8px 12px;
    margin-bottom: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    text-align: left;
    color: var(--text-secondary);
}

.server-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.server-option.selected {
    background-color: rgba(0, 191, 255, 0.2);
    border-left: 3px solid var(--primary-color);
    color: var(--text-primary);
    font-weight: 500;
}

#main-menu .menu-buttons { /* Target buttons within main menu */
    display: grid; /* Use grid for better alignment */
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 15px;
    margin: 20px 0; /* Adjusted margin */
}

#play-button { /* Make play button span full width */
    grid-column: 1 / -1;
}

/* Specific Button Styles within Main Menu */
/* These styles are using CSS variables and may need adjustments if using Tailwind color classes */
#play-button, #spectate-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 191, 255, 0.2);
    padding: 14px 28px; /* Larger padding for primary actions */
    font-size: 18px;
}

#play-button:hover, #spectate-button:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    box-shadow: var(--shadow-dark);
}

.menu-buttons-row button {
    background-color: transparent;
    color: var(--primary-light);
    border: 1px solid var(--primary-color);
    font-weight: 500;
    padding: 10px 15px; /* Standard padding for secondary actions */
    font-size: 14px;
    flex: 1;
}

.menu-buttons-row button:hover {
    background-color: rgba(0, 191, 255, 0.1);
    border-color: var(--primary-light);
    color: var(--text-primary);
}

.auth-section button {
    background-color: transparent;
    color: var(--secondary-light); /* Use secondary color */
    border: 1px solid var(--secondary-color);
    font-weight: 500;
    padding: 10px 15px;
    font-size: 14px;
}

.auth-section button:hover {
    background-color: rgba(255, 0, 255, 0.1); /* Secondary color tint */
    border-color: var(--secondary-light);
    color: var(--text-primary);
}

#main-menu .social-links { /* Target social links within main menu */
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

#main-menu .social-link { /* Style the links */
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-fast);
}

#main-menu .social-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Placeholder social icons - Keep these if using CSS for icons */
/* Social icon masks and background colors were provided in the original file */
.discord-icon { background-color: #7289DA; }
.twitter-icon { background-color: #1DA1F2; }
/* Add more icons as needed */


/* --- Store Modal Styles --- */
#store-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark semi-transparent overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500; /* Above main menu */
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

#store-modal.active {
    opacity: 1;
    visibility: visible;
}

.store-container {
    width: 95%;
    max-width: 800px; /* Larger modal */
    background-color: var(--background-dark);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-dark);
    border: 1px solid var(--primary-dark);
    display: flex;
    flex-direction: column;
    position: relative; /* For close button */
    padding: 20px;
    animation: scaleIn 0.5s ease-out forwards; /* Add entry animation */
    max-height: 90vh; /* Prevent overflow on small screens */
    overflow-y: auto; /* Enable scrolling if content exceeds height */
}

/* Keep modal close button styles as they are standard */
.modal .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    padding: 5px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal .close-button:hover {
    color: var(--primary-light);
}

.store-header {
    text-align: center;
    margin-bottom: 20px;
}

.store-header h2 {
    font-size: 24px;
    color: var(--primary-light);
}

.store-sections {
    display: flex;
    border-bottom: 1px solid var(--background-light);
    margin-bottom: 20px;
}

.store-section-button {
    flex-grow: 1;
    padding: 10px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: color var(--transition-fast), border-bottom-color var(--transition-fast);
    border-bottom: 2px solid transparent;
}

.store-section-button:hover {
    color: var(--text-primary);
}

.store-section-button.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary-color);
    font-weight: 700;
}

.store-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column; /* Default to column layout */
}

/* Tab Content - Standard CSS for layout */
.tab-content {
    display: none; /* Hide tabs by default */
}

.tab-content.active {
    display: block; /* Show active tab */
}

/* Items Grid Layout - Standard CSS for layout */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Responsive grid */
    gap: 20px;
    padding: 10px;
}

.store-item {
    background-color: var(--background-medium);
    border-radius: var(--border-radius);
    border: 1px solid var(--background-light);
    box-shadow: var(--shadow-light);
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.store-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.item-image-container {
    width: 100%;
    max-width: 100px; /* Control image size */
    height: auto;
    margin-bottom: 5px;
}

.item-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.item-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 5px;
}

.item-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    flex-grow: 1; /* Push button to bottom */
}

.item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--energy-color); /* Use energy color for price */
    margin-bottom: 10px;
}

.item-buy-button {
    background-color: var(--success-color);
    color: var(--background-dark);
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    width: 100%;
}

.item-buy-button:hover {
    background-color: #39FF14; /* Brighter green on hover */
    color: black; /* Darker text on brighter background */
}

.item-select-button { /* Used for selecting skins etc */
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary-light);
    border: 1px solid var(--primary-color);
    font-weight: 500;
    text-transform: uppercase;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    width: 100%;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.item-select-button:hover {
    background-color: rgba(0, 191, 255, 0.15);
    border-color: var(--primary-light);
    color: var(--text-primary);
}

.item-select-button.selected {
    background-color: var(--secondary-color); /* Magenta when selected */
    color: var(--text-primary);
    border-color: var(--secondary-light);
    cursor: default;
    box-shadow: var(--shadow-light);
}

.item-owned-indicator {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 700;
    margin-top: 8px;
    text-transform: uppercase;
}

.paypal-button-container {
    margin-top: 10px;
    min-height: 40px; /* Ensure space for PayPal button */
}

.shop-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 191, 255, 0.2);
    text-align: center;
    min-height: 1.5em; /* Reserve space for messages */
}

#shop-message {
    font-size: 14px;
    color: var(--info-color);
}

#shop-message.error {
    color: var(--error-color);
}

#shop-message.success {
    color: var(--success-color);
}

/* Ensure close buttons work */
.modal .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    padding: 5px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal .close-button:hover {
    color: var(--primary-light);
}

/* Customize Screen */
.customize-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100% - 140px);
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.preview-container {
    width: 100%;
    height: 200px;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#cell-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light) 0%, var(--primary-dark) 100%);
    box-shadow: 0 0 20px var(--primary-color);
}

.customization-options {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.option-section {
    background-color: var(--background-medium);
    border-radius: var(--border-radius);
    padding: 20px;
}

.option-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.color-option:hover, .color-option.active {
    transform: scale(1.1);
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Shop Screen */
.currency-display {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
}

.currency-icon {
    width: 20px;
    height: 20px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

#currency-amount {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.shop-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100% - 140px);
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.shop-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.shop-category-button {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    background-color: var(--background-light);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.shop-category-button:hover, .shop-category-button.active {
    background-color: var(--primary-color);
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Settings Screen */
.settings-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100% - 140px);
    padding: 80px 20px 20px;
    overflow-y: auto;
    gap: 30px;
}

.settings-section {
    background-color: var(--background-medium);
    border-radius: var(--border-radius);
    padding: 20px;
}

.settings-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--background-light);
}

.setting-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.setting-control {
    background-color: var(--background-light);
    color: var(--text-primary);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Roboto', sans-serif;
}

.slider {
    -webkit-appearance: none;
    width: 200px;
    height: 8px;
    border-radius: 4px;
    background: var(--background-light);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.volume-value {
    width: 50px;
    text-align: right;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background-light);
    transition: var(--transition-fast);
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition-fast);
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.control-info {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Tutorial Screen */
.tutorial-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100% - 140px);
    padding: 80px 20px 20px;
}

.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.nav-button {
    padding: 8px 15px;
    border-radius: var(--border-radius);
    background-color: var(--background-light);
    color: var(--text-primary);
    font-size: 14px;
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tutorial-progress {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
}

.tutorial-content {
    flex-grow: 1;
    overflow-y: auto;
}

.tutorial-step {
    display: none;
    text-align: center;
}

.tutorial-step.active {
    display: block;
}

.tutorial-step h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.tutorial-image {
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0 auto 30px;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.tutorial-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tutorial-step p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Leaderboard Panel */
.panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background-color: var(--background-medium);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-dark);
    z-index: 200;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--background-light);
}

.panel-header h3 {
    font-size: 20px;
    margin: 0;
}

.close-panel-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close-panel-button:hover {
    color: var(--text-primary);
}

.leaderboard-content {
    padding: 20px;
}

.leaderboard-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--background-light);
}

.leaderboard-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.leaderboard-tab:hover, .leaderboard-tab.active {
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
}

.leaderboard-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Game Over Screen */
.game-over-container {
    width: 90%;
    max-width: 500px;
    background-color: var(--background-medium);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
}

.game-over-container h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--error-color);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
}

.rewards-container {
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
}

.rewards-container h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.currency-reward {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

#currency-reward-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
}

.game-over-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Notification Container */
#notification-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    max-width: 300px;
    animation: slideIn 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
    pointer-events: none;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

.notification.info {
    border-left: 4px solid var(--info-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Pulse Animation for Loading Logo */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}
/* Auth Modal Styles (Moved from auth.html) */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto;
}

.auth-modal-content {
    background-color: #1a1a2e;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    color: #e6e6e6;
    position: relative;
}

.auth-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

.auth-close:hover {
    color: #fff;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
}

.auth-tab {
    padding: 10px 20px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    color: #888;
    font-size: 16px;
    font-weight: bold;
    outline: none;
}

.auth-tab.active {
    color: #4CAF50;
    border-bottom: 3px solid #4CAF50;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #2a2a40;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #4CAF50;
    outline: none;
}

.auth-button {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

.auth-button:hover {
    background-color: #45a049;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-link {
    color: #4CAF50;
    text-decoration: none;
    cursor: pointer;
    margin: 0 10px;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.auth-success {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.auth-error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
}

/* Verification Page Styles */
.verification-container {
    display: none;
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background-color: #1a1a2e;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    color: #e6e6e6;
    text-align: center;
}

.verification-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.verification-success .verification-icon {
    color: #4CAF50;
}

.verification-error .verification-icon {
    color: #f44336;
}

.verification-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.verification-message {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
}

.verification-button {
    padding: 12px 24px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.verification-button:hover {
    background-color: #45a049;
}

/* Reset Password Page Styles */
.reset-password-container {
    display: none;
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background-color: #1a1a2e;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    color: #e6e6e6;
}

.reset-password-title {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.reset-password-message {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    text-align: center;
}
