:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #ff007f;
    --gold: #ffab00;
    --bg-dark: #060919;
    --card-bg: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    margin: 0; padding: 0;
}

body {
    background: #02040a;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    max-height: 920px;
    background: linear-gradient(180deg, #0d1527 0%, #060919 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 242, 254, 0.25);
    border-left: 1px solid rgba(0, 242, 254, 0.2);
    border-right: 1px solid rgba(0, 242, 254, 0.2);
}

@media (min-width: 481px) {
    #game-container {
        height: 95vh;
        border-radius: 24px;
        border: 1px solid rgba(0, 242, 254, 0.3);
    }
}

.shake {
    animation: shake 0.15s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-3px, 3px); }
    75% { transform: translate(3px, -3px); }
}

.bg-glow {
    position: absolute;
    top: -10%; left: 50%;
    transform: translateX(-50%);
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.laser-beam {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent 90%, rgba(0, 242, 254, 0.15) 100%);
    pointer-events: none;
    z-index: 2;
}

.lanes {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    z-index: 2;
}
.lane {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}
.lane:last-child { border-right: none; }

.lane-key {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
}

.hit-line {
    position: absolute;
    bottom: 120px;
    left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 16px var(--primary);
    z-index: 3;
    pointer-events: none;
}

/* KAROLAR VE EFEKTLER */
.tile {
    position: absolute;
    width: 25%;
    height: 160px;
    background: linear-gradient(180deg, #00f2fe 0%, #4facfe 100%);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4), inset 0 2px 4px rgba(255,255,255,0.8);
    cursor: pointer;
    z-index: 5;
}

.tile.hold-tile {
    height: 320px;
    background: linear-gradient(180deg, #7928ca 0%, #ff007f 100%);
    box-shadow: 0 6px 20px rgba(255, 0, 127, 0.4), inset 0 2px 4px rgba(255,255,255,0.8);
}

.tile.hit {
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.12s ease-out;
}

/* PARTİKÜLLER */
.particle {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 15;
    animation: pop 0.4s ease-out forwards;
}

@keyframes pop {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* HUD */
#hud {
    position: absolute;
    top: 18px; left: 0; width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}
.brand-header {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary);
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.6);
}
.score-display {
    font-size: 52px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 4px 16px rgba(0,0,0,0.8);
    line-height: 1;
    margin: 4px 0;
}
.hud-stats {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
}
.combo-badge {
    background: rgba(255, 0, 127, 0.2);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 12px;
}
.acc-badge {
    background: rgba(0, 242, 254, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
}

#judgment-txt {
    position: absolute;
    top: 32%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    font-weight: 900;
    font-style: italic;
    pointer-events: none;
    z-index: 9;
    display: none;
    text-shadow: 0 0 20px var(--primary);
}

/* EKRANLAR VE MENÜ */
.screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(6, 9, 25, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
    padding: 24px 20px;
    backdrop-filter: blur(12px);
    overflow-y: auto;
}
.brand-logo {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.domain-tag {
    font-size: 11px;
    color: #64748b;
    letter-spacing: 1px;
    margin-bottom: 16px;
    font-weight: 600;
}

.tab-menu {
    display: flex;
    width: 100%;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.08);
}
.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-weight: 700;
    font-size: 13px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn.active {
    background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%);
    color: #060919;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.content-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}
.card.active {
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.15) 0%, rgba(79, 172, 254, 0.15) 100%);
    border-color: var(--primary);
}
.card.locked {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.8);
}
.card-info h4 { margin: 0 0 3px 0; font-size: 14px; color: #f8fafc; }
.card-info span { font-size: 11px; color: #64748b; }

.badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
    margin-left: 6px;
}
.badge.easy { background: rgba(46, 213, 115, 0.15); color: #2ed573; }
.badge.medium { background: rgba(255, 171, 0, 0.15); color: #ffab00; }
.badge.hard { background: rgba(255, 71, 87, 0.15); color: #ff4757; }
.badge.vip { background: rgba(255, 0, 127, 0.2); color: #ff007f; }

.start-btn {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-weight: 800;
    color: #060919;
    background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%);
    border: none;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.35);
    cursor: pointer;
}
.start-btn:active { transform: scale(0.98); }

.over-title {
    font-size:26px; margin: 10px 0 4px 0;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.final-score { font-size: 56px; font-weight: 900; color: #fff; margin-bottom: 2px; }
.high-score-tag { font-size: 13px; color: #00f2fe; margin-bottom: 15px; }

.stats-box {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.stats-box span { color: #94a3b8; }
.stats-box b { color: #fff; }

.menu-btn { background:transparent; border:none; color:#64748b; margin-top:10px; cursor:pointer; font-weight:600; }