/* Kinetic Flow - Oracle Style */
:root {
    /* Oracle Color Palette - Mystical Tech */
    --void-black: #0a0a0f;
    --deep-space: #12121a;
    --nebula-purple: #1a1a2e;
    --oracle-gold: #ffd700;
    --oracle-glow: #ffec8b;
    --ethereal-cyan: #00f5ff;
    --soft-cyan: #88ffff;
    --mystic-violet: #9d4edd;
    --particle-white: #ffffff;
    --particle-glow: rgba(255, 255, 255, 0.8);
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    
    /* Effects */
    --glow-gold: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
    --glow-cyan: 0 0 20px rgba(0, 245, 255, 0.5), 0 0 40px rgba(0, 245, 255, 0.3);
    --glow-particle: 0 0 6px rgba(255, 255, 255, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--void-black);
    font-family: var(--font-body);
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--nebula-purple) 0%, var(--deep-space) 50%, var(--void-black) 100%);
}

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

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#score-value {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 900;
    color: var(--oracle-gold);
    text-shadow: var(--glow-gold);
    line-height: 1;
}

#score-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--ethereal-cyan);
    letter-spacing: 4px;
    margin-top: 4px;
}

#level-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

#level-text {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--soft-cyan);
    letter-spacing: 2px;
}

#progress-bar {
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--ethereal-cyan), var(--oracle-gold));
    box-shadow: var(--glow-cyan);
    transition: width 0.3s ease;
}

#touch-hint {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    animation: pulse 2s ease-in-out infinite;
    opacity: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

.menu-content {
    text-align: center;
    padding: 40px 20px;
}

.game-title {
    margin-bottom: 20px;
}

.title-kinetic {
    display: block;
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 900;
    color: var(--particle-white);
    letter-spacing: 8px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    line-height: 1.1;
}

.title-flow {
    display: block;
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 900;
    color: var(--oracle-gold);
    letter-spacing: 12px;
    text-shadow: var(--glow-gold);
    line-height: 1.1;
    margin-top: 4px;
}

.tagline {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    color: var(--soft-cyan);
    letter-spacing: 3px;
    margin-bottom: 40px;
    opacity: 0.8;
}

.menu-btn {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--void-black);
    background: linear-gradient(135deg, var(--oracle-gold), var(--oracle-glow));
    border: none;
    padding: 18px 48px;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 3px;
    box-shadow: var(--glow-gold);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.7);
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn.active {
    border-color: var(--ethereal-cyan);
    background: rgba(0, 245, 255, 0.1);
    box-shadow: var(--glow-cyan);
}

/* Game Over Screen */
.end-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 900;
    color: var(--oracle-gold);
    letter-spacing: 6px;
    text-shadow: var(--glow-gold);
    margin-bottom: 30px;
}

.final-score {
    margin-bottom: 40px;
}

.final-score span:first-child {
    display: block;
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 900;
    color: var(--particle-white);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    line-height: 1;
}

.final-score span:last-child {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--soft-cyan);
    letter-spacing: 3px;
    margin-top: 10px;
    display: block;
}

/* Touch gravity indicator */
#gravity-indicator {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid var(--ethereal-cyan);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    box-shadow: var(--glow-cyan), inset 0 0 20px rgba(0, 245, 255, 0.2);
    transition: opacity 0.2s ease;
}

#gravity-indicator.active {
    opacity: 0.6;
    animation: gravity-pulse 1s ease-in-out infinite;
}

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

/* Particle burst effect */
.particle-burst {
    position: absolute;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-height: 700px) {
    .title-kinetic { font-size: 36px; }
    .title-flow { font-size: 48px; }
    .tagline { font-size: 14px; margin-bottom: 30px; }
    .menu-btn { padding: 16px 40px; font-size: 14px; }
}

@media (max-height: 600px) {
    .title-kinetic { font-size: 32px; letter-spacing: 6px; }
    .title-flow { font-size: 42px; letter-spacing: 8px; }
    #score-value { font-size: 36px; }
}