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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a14;
    color: #fff;
    overflow: hidden;
}

/* Global Header */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 9999;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.logo-diamond {
    font-size: 2rem;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #0ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.nav-links a:hover {
    color: #fff;
    text-shadow: 0 0 20px #0ff;
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #1a0a2e 0%, #0a0a14 100%);
}

.screen.active {
    display: flex;
}

.overlay-screen {
    background: rgba(10, 10, 20, 0.95);
    z-index: 1000;
}

/* Main Menu */
.menu-container {
    text-align: center;
    max-width: 900px;
    width: 100%;
    padding: 80px 20px 20px;
}

.player-stats-header {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(255, 0, 255, 0.1) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-label {
    font-size: 0.7rem;
    color: #0ff;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px #0ff;
}

/* Title */
.game-title-container {
    margin-bottom: 30px;
}

.neon-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    background: linear-gradient(45deg, #0ff, #f0f, #0ff);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: neonGlow 3s ease infinite;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
    letter-spacing: 5px;
}

@keyframes neonGlow {
    0%, 100% { background-position: 0% 50%; filter: brightness(1); }
    50% { background-position: 100% 50%; filter: brightness(1.3); }
}

.game-subtitle {
    font-size: 1.2rem;
    color: #0ff;
    letter-spacing: 8px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

/* XP Bar */
.xp-container {
    margin: 20px auto;
    max-width: 500px;
}

.xp-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #0ff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.xp-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0ff 0%, #f0f 100%);
    transition: width 0.5s ease;
    box-shadow: 0 0 20px #0ff;
}

.xp-text {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #0ff;
}

/* Buttons */
.menu-buttons {
    margin: 40px 0;
}

.btn-play {
    background: linear-gradient(135deg, #0ff 0%, #f0f 100%);
    border: none;
    padding: 25px 60px;
    font-size: 2rem;
    font-weight: 900;
    color: #000;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.5);
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
}

.btn-play:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 60px rgba(0, 255, 255, 0.8);
}

.btn-play::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.btn-icon {
    font-size: 2.5rem;
}

.secondary-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-menu {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #0ff;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 700;
    color: #0ff;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-menu:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.5);
}

.btn-primary {
    background: linear-gradient(135deg, #0ff, #f0f);
    border: none;
    padding: 18px 45px;
    font-size: 1.3rem;
    font-weight: 900;
    color: #000;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary {
    background: rgba(0, 255, 255, 0.15);
    border: 2px solid #0ff;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0ff;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-tertiary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 15px 40px;
    font-size: 1rem;
    color: #fff;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 30px;
    font-size: 1rem;
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s;
}

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

/* Daily Challenge */
.daily-challenge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 105, 180, 0.1));
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

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

.challenge-icon {
    font-size: 2rem;
}

.challenge-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.challenge-timer {
    font-size: 1rem;
    color: #ff69b4;
    font-weight: 700;
}

.challenge-desc {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.challenge-progress-bar {
    width: 100%;
    height: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.challenge-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd700, #ff69b4);
    transition: width 0.5s;
}

.challenge-progress-text {
    color: #ffd700;
    font-size: 0.9rem;
}

.challenge-reward {
    margin-top: 10px;
    color: #0ff;
    font-weight: 700;
}

/* Current Skin Display */
.current-skin-display {
    margin-top: 30px;
    padding: 15px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
}

.skin-label {
    display: block;
    font-size: 0.8rem;
    color: #0ff;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.skin-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.skin-icon {
    font-size: 3rem;
}

.skin-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

/* Game Screen */
#gameCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: all;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><path d="M 5 5 L 20 15 L 12 15 L 5 30 Z" fill="%23ff4444" stroke="%23ffffff" stroke-width="2"/></svg>') 5 5, auto;
    z-index: 100;
}

.hud-top {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
}

.hud-left, .hud-center, .hud-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.score-display, .combo-display, .distance-display, .gems-display {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #0ff;
    border-radius: 15px;
    padding: 10px 20px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.score-label, .combo-text {
    display: block;
    font-size: 0.7rem;
    color: #0ff;
    letter-spacing: 2px;
}

.score-value, .combo-value {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 15px #0ff;
}

.distance-value {
    font-size: 4rem;
    font-weight: 900;
    color: #0ff;
    text-shadow: 0 0 30px #0ff;
}

.distance-unit {
    font-size: 1.5rem;
    color: #fff;
}

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

.gems-icon {
    font-size: 2rem;
}

.gems-value {
    font-size: 2rem;
    font-weight: 900;
    color: #ffd700;
}

/* Power-up Indicators */
.powerup-indicators {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.powerup-slot {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #f0f;
    border-radius: 15px;
    padding: 15px;
    min-width: 100px;
    text-align: center;
    animation: powerupPulse 1s infinite;
}

@keyframes powerupPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 0, 255, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 0, 255, 0.8); }
}

.powerup-icon {
    font-size: 2rem;
}

.powerup-timer {
    display: block;
    color: #f0f;
    font-weight: 700;
    margin-top: 5px;
}

/* Action Notification */
.action-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 255, 255, 0.9);
    color: #000;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 2rem;
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    box-shadow: 0 0 40px #0ff;
}

.action-notification.show {
    opacity: 1;
    animation: notifBounce 0.5s;
}

@keyframes notifBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Pause Button */
.pause-btn {
    position: absolute;
    top: 80px;
    right: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #0ff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s;
}

.pause-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Pause Screen */
.pause-container {
    text-align: center;
    padding: 40px;
}

.pause-title {
    font-size: 5rem;
    color: #0ff;
    text-shadow: 0 0 40px #0ff;
    margin-bottom: 50px;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* Game Over Screen */
.gameover-container {
    text-align: center;
    max-width: 900px;
    padding: 20px;
}

.gameover-title {
    font-size: clamp(3rem, 8vw, 6rem);
    background: linear-gradient(45deg, #0ff, #f0f);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    animation: neonGlow 2s infinite;
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #0ff;
    border-radius: 15px;
    padding: 20px;
}

.stat-card-label {
    display: block;
    font-size: 0.8rem;
    color: #0ff;
    margin-bottom: 10px;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
}

.rewards-section, .unlocks-section {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #ffd700;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
}

.rewards-title, .unlocks-title {
    color: #ffd700;
    margin-bottom: 15px;
}

.rewards-list {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.personal-best {
    background: linear-gradient(135deg, #ffd700, #ff69b4);
    padding: 15px 30px;
    border-radius: 15px;
    margin: 20px 0;
    animation: bestPulse 1s infinite;
}

@keyframes bestPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.gameover-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.share-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #0ff;
    padding: 12px 25px;
    border-radius: 20px;
    color: #0ff;
    cursor: pointer;
    transition: all 0.3s;
}

/* Shop Screen */
.shop-container, .leaderboard-container, .achievements-container, .settings-container {
    max-width: 1000px;
    padding: 80px 20px 20px;
    width: 100%;
}

.shop-title, .leaderboard-title, .achievements-title, .settings-title {
    font-size: 3rem;
    color: #0ff;
    text-shadow: 0 0 30px #0ff;
    margin-bottom: 30px;
    text-align: center;
}

.player-gems-display {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ffd700;
}

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

.shop-tab {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #0ff;
    padding: 12px 25px;
    color: #0ff;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s;
}

.shop-tab.active {
    background: #0ff;
    color: #000;
}

.shop-tab-content {
    display: none;
}

.shop-tab-content.active {
    display: block;
}

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

.shop-item {
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid #0ff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.shop-item.owned {
    border-color: #ffd700;
}

.shop-item.equipped {
    background: rgba(0, 255, 255, 0.2);
    border-color: #fff;
}

/* Settings */
.settings-group {
    margin: 30px 0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    margin-bottom: 15px;
}

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

.toggle input {
    display: none;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    transition: 0.3s;
}

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

.toggle input:checked + .toggle-slider {
    background: #0ff;
}

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

.danger-zone {
    margin-top: 50px;
    padding: 20px;
    border: 2px solid #f00;
    border-radius: 15px;
}

.btn-danger {
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid #f00;
    color: #f00;
    padding: 12px 25px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 15px;
}

/* Loading Screen */
.loading-spinner {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(0, 255, 255, 0.3);
    border-top-color: #0ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 20px;
    font-size: 1.5rem;
    color: #0ff;
}

/* Multiplayer Screen */
.multiplayer-container {
    max-width: 1000px;
    padding: 80px 20px 20px;
    width: 100%;
    text-align: center;
}

.multiplayer-title {
    font-size: 3rem;
    color: #0ff;
    text-shadow: 0 0 30px #0ff;
    margin-bottom: 40px;
}

.multiplayer-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.mode-card {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    border: 2px solid #0ff;
    border-radius: 20px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.5);
    border-color: #f0f;
}

.mode-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.mode-card h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
}

.mode-card p {
    color: #0ff;
    font-size: 1rem;
}

.btn-multiplayer {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
    border-color: #f0f;
    color: #f0f;
}

.btn-multiplayer:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(255, 0, 255, 0.3));
    box-shadow: 0 5px 20px rgba(255, 0, 255, 0.5);
}

/* Ghost Players (other players in multiplayer) */
.ghost-player {
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .global-header {
        padding: 0 20px;
    }
    .hud-top {
        padding: 0 15px;
        flex-direction: column;
        gap: 10px;
    }
    .final-stats {
        grid-template-columns: 1fr 1fr;
    }
    .multiplayer-modes {
        grid-template-columns: 1fr;
    }
}
