:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --neon-cyan: #00d4ff;
    --neon-magenta: #ff00ff;
    --neon-lime: #00ff88;
    --neon-orange: #ff8800;
    --neon-pink: #ff6b9d;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    position: relative;
    min-height: 100vh;
    padding: 1rem;
}

/* Background effects */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--neon-cyan);
    top: -200px;
    left: -200px;
    animation: pulse-glow 8s ease-in-out infinite;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: var(--neon-magenta);
    bottom: -150px;
    right: -150px;
    animation: pulse-glow 10s ease-in-out infinite reverse;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: var(--neon-pink);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.1); }
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

.title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-pulse 2s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
    margin-bottom: 1rem;
}

@keyframes title-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.subtitle {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.shortcuts-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    opacity: 0.6;
}

/* News ticker */
.news-ticker {
    display: flex;
    align-items: center;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    max-width: 900px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.news-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: var(--neon-orange);
    margin-right: 1rem;
    white-space: nowrap;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.news-scroll {
    flex: 1;
    overflow: hidden;
}

.news-content {
    display: flex;
    animation: scroll-news 30s linear infinite;
    white-space: nowrap;
}

.news-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-right: 2rem;
}

@keyframes scroll-news {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Comment popup */
.comment-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.9), rgba(255, 0, 255, 0.9));
    color: white;
    padding: 1.5rem 2.5rem;
    border-radius: 16px;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.7rem, 2vw, 1rem);
    z-index: 1000;
    animation: pop-in 0.3s ease-out;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.5);
}

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

/* Dev stats popup */
.dev-stats-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 15, 0.95);
    border: 2px solid var(--neon-lime);
    padding: 2rem;
    border-radius: 16px;
    z-index: 1000;
    animation: glitch-in 0.5s ease-out;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
}

.dev-stats-popup h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
    color: var(--neon-lime);
    margin-bottom: 1rem;
}

.dev-stats-popup p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

@keyframes glitch-in {
    0%, 20%, 40%, 60%, 80%, 100% { transform: translate(-50%, -50%); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-48%, -52%); }
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Vibe-O-Meter */
.vibe-o-meter {
    text-align: center;
    margin: 2rem auto;
    padding: 1.5rem;
    background: rgba(18, 18, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    max-width: 300px;
}

.vom-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: var(--neon-orange);
    margin-bottom: 1rem;
    animation: vom-pulse 1.5s ease-in-out infinite;
}

@keyframes vom-pulse {
    0%, 100% { text-shadow: 0 0 10px var(--neon-orange); }
    50% { text-shadow: 0 0 30px var(--neon-orange); }
}

.vom-gauge {
    position: relative;
}

.vom-dial {
    width: 150px;
    height: 75px;
    margin: 0 auto;
    background: linear-gradient(180deg, 
        rgba(255, 0, 0, 0.3) 0%,
        rgba(255, 136, 0, 0.3) 33%,
        rgba(0, 255, 136, 0.3) 66%,
        rgba(0, 212, 255, 0.3) 100%
    );
    border-radius: 150px 150px 0 0;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
}

.vom-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 60px;
    background: var(--neon-cyan);
    transform-origin: bottom center;
    transition: transform 0.5s ease-out;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 0 20px currentColor;
}

.vom-center {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border: 3px solid var(--neon-cyan);
    border-radius: 50%;
}

.vom-labels {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.5rem 0;
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.vom-total {
    margin-top: 1rem;
}

.vom-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.vom-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    margin: 2rem 0;
}

/* Editor card */
.editor-card {
    position: relative;
    background: rgba(18, 18, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.editor-card.hovered {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
}

.editor-card.revealed {
    animation: reveal-card 0.5s ease-out;
}

@keyframes reveal-card {
    0% { transform: scale(0) rotate(180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.secret-card {
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.2),
        rgba(255, 136, 0, 0.2)
    );
    border-color: var(--neon-pink);
    animation: rainbow-border 3s linear infinite;
}

@keyframes rainbow-border {
    0% { border-color: var(--neon-pink); }
    33% { border-color: var(--neon-orange); }
    66% { border-color: var(--neon-magenta); }
    100% { border-color: var(--neon-pink); }
}

.crown-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 2rem;
    animation: crown-bounce 1s ease-in-out infinite;
    z-index: 20;
}

@keyframes crown-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.card-content {
    position: relative;
    z-index: 1;
}

.editor-icon {
    text-align: center;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 20px currentColor);
}

.editor-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.editor-power {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--neon-lime);
    text-align: center;
    margin-bottom: 1rem;
}

.vibe-meter {
    margin-bottom: 1rem;
}

.vibe-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.vibe-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.vibe-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.vibe-percent {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.vote-section {
    text-align: center;
}

.vote-count {
    margin-bottom: 0.75rem;
}

.vote-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
}

.vote-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.vote-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.vote-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.vote-button:active {
    transform: scale(0.98);
}

.lore-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--neon-cyan);
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 250px;
    animation: tooltip-appear 0.3s ease-out;
    z-index: 100;
}

@keyframes tooltip-appear {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Secret button */
.secret-button {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(18, 18, 26, 0.9);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    z-index: 100;
}

.secret-button:hover {
    transform: scale(1.2);
    box-shadow: 0 0 30px var(--neon-pink);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Confetti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 50;
}

.confetti-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 1s ease-out forwards;
}

@keyframes confetti-fall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(200px) rotate(720deg); }
}

/* Stats panel */
.stats-panel {
    background: rgba(18, 18, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 2rem 1rem;
    backdrop-filter: blur(10px);
}

.stats-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    color: var(--neon-cyan);
    text-align: center;
    margin-bottom: 1.5rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-rank {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

.stat-name {
    width: 150px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.stat-bar-container {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease-out;
}

.stat-percent {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    width: 50px;
    text-align: right;
    color: var(--text-secondary);
}

/* Actions */
.actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 1rem;
}

.action-button {
    padding: 1rem 2rem;
    border: 2px solid;
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.share-button {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.share-button:hover {
    background: var(--neon-cyan);
    color: var(--bg-primary);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.reset-button {
    border-color: var(--neon-orange);
    color: var(--neon-orange);
}

.reset-button:hover {
    background: var(--neon-orange);
    color: var(--bg-primary);
    box-shadow: 0 0 30px rgba(255, 136, 0, 0.5);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer a {
    color: var(--neon-pink);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px currentColor;
}

.disclaimer {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-name {
        width: 100px;
        font-size: 0.75rem;
    }
    
    .news-ticker {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .news-label {
        margin-right: 0;
    }
    
    .secret-button {
        bottom: 80px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-button {
        width: 100%;
    }
}