:root {
    --primary-color: #FF006E;
    --secondary-color: #00FF88;
    --accent-color: #00D4FF;
    --warning-color: #FFD700;
    --danger-color: #FF0080;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glow: 0 0 20px rgba(255, 0, 110, 0.3);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1a2e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Header */
.app-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 0, 110, 0.2);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.app-header h1 {
    font-size: 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--primary-color);
    box-shadow: var(--glow);
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 0, 110, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1rem;
    padding-bottom: 80px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

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

/* Game Container */
.game-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.score-display, .game-stats {
    display: flex;
    gap: 2rem;
}

.score-item, .stat-item {
    text-align: center;
}

.score-label, .stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

#current-score, #high-score, #speed-display, #level-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Canvas Container */
.game-canvas-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

#gameCanvas {
    width: 100%;
    height: auto;
    display: block;
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 100%);
}

/* Game Screens */
.start-screen, .game-over {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.start-screen.hidden, .game-over.hidden {
    display: none;
}

.start-content, .game-over-content {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 90%;
    width: 400px;
}

.instructions {
    margin: 1.5rem 0;
    text-align: left;
}

.instructions h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

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

.instructions li {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    background: linear-gradient(45deg, var(--primary-color), var(--danger-color));
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 110, 0.4);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.btn-secondary {
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
}

.btn-danger {
    background: linear-gradient(45deg, var(--danger-color), #ff4757);
}

.btn-warning {
    background: linear-gradient(45deg, var(--warning-color), #ffa502);
    color: #000;
}

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

/* Game Controls */
.game-controls {
    margin-top: 1rem;
}

.mobile-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.control-btn {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover, .control-btn:active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--glow);
    transform: scale(1.1);
}

.keyboard-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Leaderboard */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leaderboard-list {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.leaderboard-rank {
    font-weight: bold;
    color: var(--warning-color);
    font-size: 1.2rem;
    min-width: 3rem;
}

.leaderboard-score {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.leaderboard-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.no-scores {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

/* Settings */
.settings-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-group {
    margin-bottom: 2rem;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    color: var(--text-primary);
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.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: #333;
    transition: 0.4s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

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

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

.setting-select {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    width: 100%;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* FAQ */
.faq-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

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

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 0;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 0 1rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
    animation: slideDown 0.3s ease;
}

.faq-answer[hidden] {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 0, 110, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(255, 0, 110, 0.1);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-item:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-header h1 {
        font-size: 1.2rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .score-display, .game-stats {
        justify-content: center;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .game-over-buttons {
        flex-direction: column;
    }
    
    .start-content, .game-over-content {
        padding: 1rem;
        width: 95%;
    }
    
    .instructions {
        text-align: center;
    }
    
    .instructions ul {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem;
        padding-bottom: 80px;
    }
    
    .game-container {
        padding: 0.5rem;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
    
    .nav-item span {
        font-size: 0.6rem;
    }
}

/* Holographic Effects */
.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 0, 110, 0.1) 50%, transparent 70%);
    pointer-events: none;
    animation: holographicScan 3s linear infinite;
    border-radius: var(--border-radius);
}

@keyframes holographicScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Game-specific animations */
.score-item, .stat-item {
    transition: all 0.3s ease;
}

.score-item:hover, .stat-item:hover {
    transform: scale(1.1);
}

#current-score, #high-score {
    transition: all 0.5s ease;
}

.score-update {
    animation: scoreGlow 0.5s ease;
}

@keyframes scoreGlow {
    0% { transform: scale(1); color: var(--secondary-color); }
    50% { transform: scale(1.2); color: var(--warning-color); }
    100% { transform: scale(1); color: var(--secondary-color); }
}
