/* ==========================================================================
   NEON SLITHER - STİL VE ARAYÜZ DOSYASI
   Felerous Arcade Standartları: 100dvh, Touch-action: none, Saf CSS HUD
   ========================================================================== */

:root {
    --bg-dark: #06080d;
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00aa;
    --neon-amber: #ffaa00;
    --neon-green: #00ff66;
    --text-main: #f0f4f8;
    --panel-bg: rgba(10, 16, 28, 0.82);
    --panel-border: rgba(0, 240, 255, 0.28);
    --font-cyber: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

html, body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-cyber);
    overflow: hidden;
    position: fixed;
    inset: 0;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    background-color: var(--bg-dark);
}



/* ── Sol Üst Mini Radar (Harita) ── */
.radar-container {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: rgba(6, 12, 22, 0.85);
    border: 2px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    overflow: hidden;
    z-index: 10;
    pointer-events: none;
}

#radar-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── SAĞ ÜST KÜME (FPS, SES VE LİDERLİK TABLOSU YAN YANA) ── */
.top-right-cluster {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    z-index: 25;
    pointer-events: auto;
}

.hud-controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.leaderboard-panel {
    position: relative;
    width: 240px;
    background: rgba(11, 19, 34, 0.92);
    border: 1.5px solid rgba(0, 240, 255, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.15);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    transform-origin: top right;
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.22s ease;
}

.leaderboard-panel.hidden {
    display: none !important;
}

/* Başlık / Aç-Kapa Çubuğu */
.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    background: rgba(0, 240, 255, 0.08);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    cursor: pointer;
    transition: background 0.15s ease;
}

.leaderboard-header:hover {
    background: rgba(0, 240, 255, 0.15);
}

.lb-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lb-trophy {
    font-size: 0.95rem;
}

.lb-title {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}

.lb-count-badge {
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid rgba(0, 240, 255, 0.6);
    color: var(--neon-cyan);
    font-size: 0.6rem;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
}

.lb-toggle-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, color 0.15s ease;
}

.lb-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.leaderboard-panel.collapsed .lb-toggle-btn svg {
    transform: rotate(-90deg);
}

.leaderboard-panel.collapsed .leaderboard-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* Tablo Gövdesi (Kaydırılabilir) */
.leaderboard-body {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 10px 8px 10px;
    transition: max-height 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.2s ease, padding 0.28s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.3) transparent;
}

.leaderboard-body::-webkit-scrollbar {
    width: 4px;
}

.leaderboard-body::-webkit-scrollbar-track {
    background: transparent;
}

.leaderboard-body::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.4);
    border-radius: 4px;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.lb-table thead th {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #64748b;
    padding: 3px 4px 5px 4px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-table thead th.col-rank {
    width: 28px;
    text-align: center;
}

.lb-table thead th.col-xp {
    text-align: right;
    width: 65px;
}

.lb-row td {
    padding: 5px 4px;
    color: #cbd5e1;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lb-row.player-row td {
    color: #ffffff;
    font-weight: 900;
    background: rgba(0, 240, 255, 0.12);
}

.lb-row.player-row td.col-name {
    color: var(--neon-cyan);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}

.lb-row td.col-rank {
    text-align: center;
    font-weight: 900;
    color: #94a3b8;
}

.lb-row.player-row td.col-rank {
    color: #00ff88;
}

.lb-row td.col-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.lb-row td.col-xp {
    text-align: right;
    color: #38bdf8;
    font-weight: 800;
}

.lb-row.player-row td.col-xp {
    color: #00ff88;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

/* ── MOBİL UYARLAMA (Sağ üstten aşağı doğru akıcı açılan / kaydırılabilir tablo) ── */
@media (max-width: 768px) {
    .top-right-cluster {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    .hud-controls-row {
        gap: 5px;
    }
    .fps-chip {
        font-size: 0.65rem;
        padding: 4px 8px;
        border-radius: 12px;
    }
    .quality-hud-btn {
        font-size: 0.65rem;
        padding: 4px 8px;
        border-radius: 12px;
        gap: 3px;
    }
    .quality-hud-btn .quality-icon {
        font-size: 0.72rem;
    }
    .icon-btn {
        width: 30px;
        height: 30px;
    }
    .icon-btn svg {
        width: 15px;
        height: 15px;
    }
    .leaderboard-panel {
        width: 175px;
        border-radius: 12px;
    }
    .leaderboard-header {
        padding: 4px 8px;
    }
    .lb-title {
        font-size: 0.64rem;
        letter-spacing: 1px;
    }
    .leaderboard-body {
        max-height: 170px;
        padding: 3px 5px 5px 5px;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    .lb-table {
        font-size: 0.64rem;
    }
    .lb-table thead th {
        font-size: 0.52rem;
        padding: 2px 3px 4px 3px;
    }
    .lb-row td {
        padding: 4px 3px;
    }
    .lb-row td.col-name {
        max-width: 75px;
    }
    .lb-table thead th.col-xp,
    .lb-row td.col-xp {
        width: 48px;
    }
}

.fps-chip {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 0 8px rgba(0, 255, 102, 0.08);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

/* Sağ Üst Kalite Geçiş Butonu (High / Low) */
.quality-hud-btn {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 7px 11px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.quality-hud-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
    transform: translateY(-1px);
}

.quality-hud-btn.is-low {
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.45);
}

.quality-hud-btn.is-low:hover {
    border-color: #facc15;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

.quality-hud-btn .quality-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.quality-hud-btn .quality-label {
    font-weight: 900;
    letter-spacing: 0.8px;
}

.brand-chip {
    background: var(--panel-bg);
    border: 1px solid rgba(255, 0, 170, 0.3);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--neon-magenta);
    text-shadow: 0 0 10px rgba(255, 0, 170, 0.5);
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    border-color: var(--neon-cyan);
    transform: scale(1.05);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ── Mobil Yüzen Siber Sanal Joystick ── */
.joystick-base {
    position: fixed;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, rgba(6, 12, 22, 0.72) 60%, rgba(0, 240, 255, 0.25) 100%);
    border: 2px solid rgba(0, 240, 255, 0.45);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.3), inset 0 0 16px rgba(0, 240, 255, 0.18);
    pointer-events: none;
    z-index: 25;
    opacity: 0;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    display: flex;
    align-items: center;
    justify-content: center;
}

.joystick-base.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.joystick-knob {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #00f0ff, #0077aa);
    border: 2px solid #ffffff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.85), inset 0 2px 4px rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transform: translate(0px, 0px);
    will-change: transform;
}

/* ── Mobil Nitro / Boost Butonu ── */
.btn-nitro {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff00aa, #800055);
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 28px rgba(255, 0, 170, 0.65), inset 0 0 15px rgba(255, 255, 255, 0.4);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.btn-nitro:active, .btn-nitro.active {
    transform: scale(0.92);
    background: radial-gradient(circle at 35% 35%, #ff33bb, #b30077);
    box-shadow: 0 0 40px rgba(255, 0, 170, 0.95), 0 0 20px #00f0ff;
}

.nitro-icon {
    width: 28px;
    height: 28px;
    fill: #ffffff;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9));
}

.nitro-text {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    margin-top: -2px;
}

/* ── Sol Alt Mobil Yönlendirici İpucu ── */
.mobile-controls-hint {
    position: absolute;
    bottom: 24px;
    left: 20px;
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #cbd5e1;
    pointer-events: none;
    z-index: 10;
}

/* ── Game Over & Başarımlar Modal Panelleri ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 13, 0.90);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), visibility 0.3s ease;
    overflow-y: auto;
    padding: 16px 14px;
    -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-card {
    position: relative;
    z-index: 201;
    pointer-events: auto;
    background: #0b111e;
    border: 1.5px solid var(--neon-magenta);
    border-radius: 22px;
    padding: 24px 28px;
    text-align: center;
    max-width: 440px;
    width: 95%;
    margin: auto;
    box-shadow: 0 0 45px rgba(255, 0, 170, 0.35);
    animation: popModal 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes popModal {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-title {
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--neon-magenta);
    margin-bottom: 6px;
    text-shadow: 0 0 16px rgba(255, 0, 170, 0.6);
}

.modal-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 22px;
}

.modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 10px;
    border-radius: 12px;
}

.stat-box .val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--neon-cyan);
}

.stat-box .lbl {
    font-size: 0.68rem;
    color: #94a3b8;
    text-transform: uppercase;
    margin-top: 3px;
    letter-spacing: 0.5px;
}

.modal-buttons-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-restart {
    flex: 1.2;
    background: linear-gradient(135deg, #ff00aa, #b026ff);
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(255, 0, 170, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-restart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255, 0, 170, 0.65);
}

.btn-menu-return {
    flex: 1;
    background: rgba(0, 240, 255, 0.1);
    border: 1.5px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
    border-radius: 14px;
    padding: 14px 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
    transition: all 0.2s ease;
}

.btn-menu-return:hover {
    background: rgba(0, 240, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
}

/* ── SİBER BAŞARIM TOAST BİLDİRİMİ ── */
.achievement-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-140%);
    background: rgba(11, 19, 34, 0.95);
    border: 1.5px solid var(--neon-cyan);
    border-radius: 16px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 1000;
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.4), inset 0 1px 3px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    max-width: 90vw;
}

.achievement-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-glow {
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.2), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.toast-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.8));
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-badge {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.toast-name {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}

.toast-desc {
    font-size: 0.75rem;
    color: #94a3b8;
}

.toast-pts {
    font-size: 0.85rem;
    font-weight: 900;
    color: #facc15;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.35);
    border-radius: 12px;
    padding: 4px 8px;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(250, 204, 21, 0.5);
}

/* ── BAŞARIMLAR MODAL VE LİSTE ── */
.achievements-card {
    position: relative;
    z-index: 201;
    pointer-events: auto;
    max-width: 660px !important;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 20px 24px !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 45px rgba(0, 240, 255, 0.35) !important;
    text-align: left !important;
}

.ach-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 14px;
    flex-shrink: 0;
}

.ach-modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ach-modal-icon {
    font-size: 2.2rem;
}

.ach-title-text {
    font-size: 1.5rem !important;
    margin-bottom: 2px !important;
    color: var(--neon-cyan) !important;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.5) !important;
}

.ach-modal-sub {
    font-size: 0.76rem;
    color: #94a3b8;
}

.ach-stats-summary {
    display: flex;
    gap: 8px;
}

.ach-stat-chip {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(0, 240, 255, 0.25);
    padding: 4px 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ach-chip-lbl {
    font-size: 0.68rem;
    color: #64748b;
}

.ach-chip-val {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
}

.btn-close-modal {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.btn-close-modal:hover {
    color: #ffffff;
}

.achievements-list-container {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
    flex: 1 1 auto;
}

.ach-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.ach-item.unlocked {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.1);
}

.ach-item.locked {
    opacity: 0.55;
    filter: grayscale(0.5);
}

.ach-item-icon {
    font-size: 1.8rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    flex-shrink: 0;
}

.ach-item.unlocked .ach-item-icon {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.ach-item-info {
    flex: 1;
    min-width: 0;
}

.ach-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.ach-item-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.ach-item-rarity {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 1px 5px;
    border-radius: 6px;
    text-transform: uppercase;
}

.rarity-common { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.rarity-uncommon { background: rgba(0, 255, 102, 0.2); color: #86efac; }
.rarity-rare { background: rgba(0, 240, 255, 0.2); color: #7dd3fc; }
.rarity-epic { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; }
.rarity-legendary { background: rgba(250, 204, 21, 0.2); color: #fde047; text-shadow: 0 0 6px rgba(250, 204, 21, 0.5); }

.ach-item-desc {
    font-size: 0.74rem;
    color: #94a3b8;
    line-height: 1.3;
}

.ach-item-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.ach-item-points {
    font-size: 0.75rem;
    font-weight: 800;
    color: #facc15;
}

.ach-item-status {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.ach-item.unlocked .ach-item-status {
    color: var(--neon-green);
}

.ach-item.locked .ach-item-status {
    color: #64748b;
}

/* ── FULLSCREEN EKRAN KAPLAMALARI (SCREEN OVERLAYS) ── */
.screen-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0.3s ease;
    overflow: hidden;
}

.screen-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

/* ══════════════════════════════════════════════════════════════
   1. SADE VE İKONİK ANA MENÜ (SLITHER.IO MİNİMALİST TARZI)
   ══════════════════════════════════════════════════════════════ */
#main-menu-screen {
    background: radial-gradient(circle at 50% 35%, rgba(13, 27, 49, 0.92) 0%, rgba(6, 8, 13, 0.98) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.main-menu-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 90%;
    max-width: 480px;
    z-index: 2;
    animation: fadeInScale 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes fadeInScale {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.menu-brand {
    margin-bottom: 24px;
}

.slither-brand-title {
    font-size: 3.4rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #00f0ff 0%, #ff00aa 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 35px rgba(0, 240, 255, 0.65), 0 0 70px rgba(255, 0, 170, 0.4);
    line-height: 1.05;
    margin: 0 0 6px 0;
    user-select: none;
}

.slither-tagline {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #94a3b8;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.menu-action-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    gap: 14px;
}

/* Slither.io Pill Nickname Input */
.nickname-box {
    width: 100%;
}

.slither-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(0, 240, 255, 0.35);
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    outline: none;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.15);
    transition: all 0.2s ease;
}

.slither-input:focus {
    border-color: #00f0ff;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 240, 255, 0.4);
    background: rgba(15, 23, 42, 0.95);
}

.slither-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
    font-weight: 600;
}

/* Slither.io Iconic Glowing Play Button */
.btn-slither-play {
    position: relative;
    width: 180px;
    height: 52px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 50%, #00e5ff 100%);
    box-shadow: 0 0 28px rgba(0, 255, 136, 0.55), inset 0 2px 6px rgba(255, 255, 255, 0.6);
    color: #061118;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.btn-slither-play:hover {
    transform: scale(1.06);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.8), inset 0 2px 8px rgba(255, 255, 255, 0.8);
}

.btn-slither-play:active {
    transform: scale(0.96);
}

.play-text {
    z-index: 2;
}

.slither-controls-hint {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 4px;
}

/* ── MOD SEÇİM BUTONLARI (TEK OYUNCU / ÇOKLU OYUNCU) ── */
.mode-buttons-row {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 380px;
    justify-content: center;
}

.btn-mode {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 52px;
    gap: 6px;
    font-size: 0.95rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.mode-icon {
    font-size: 1.15rem;
    z-index: 2;
}

.btn-mode-locked {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    box-shadow: 0 0 12px rgba(100, 116, 139, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.btn-mode-locked:hover {
    transform: none !important;
    box-shadow: 0 0 12px rgba(100, 116, 139, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.btn-mode-multiplayer {
    background: linear-gradient(135deg, #00f0ff 0%, #0099ff 50%, #8b5cf6 100%) !important;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.55), inset 0 2px 6px rgba(255, 255, 255, 0.7) !important;
    color: #061118 !important;
}

.btn-mode-multiplayer:hover {
    transform: scale(1.06) !important;
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.8), inset 0 2px 8px rgba(255, 255, 255, 0.9) !important;
}

.mode-badge-soon {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ff00aa, #8b5cf6);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 0 12px 0 8px;
    letter-spacing: 1px;
    line-height: 1.2;
    z-index: 5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mode-badge-live {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #00ff88, #00bb66);
    color: #061118;
    font-size: 0.55rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 0 12px 0 8px;
    letter-spacing: 1px;
    line-height: 1.2;
    z-index: 5;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
    animation: livePulse 1.5s infinite alternate;
}

@keyframes livePulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.08); filter: brightness(1.3); }
}

.hud-mp-status {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 19, 34, 0.92);
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 6px 18px;
    border-radius: 20px;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.3s ease;
}

.hud-mp-status.status-connecting {
    border-color: #ffaa00;
    color: #ffaa00;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.4);
}

.hud-mp-status.status-connected {
    border-color: #00ff88;
    color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.hud-mp-status.status-disconnected {
    border-color: #ff2a5f;
    color: #ff2a5f;
    box-shadow: 0 0 20px rgba(255, 42, 95, 0.4);
}

.hud-ping-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #00ff66;
    margin-left: 6px;
    text-shadow: 0 0 6px currentColor;
}

/* ── ANA MENÜ GRAFİK KALİTESİ SEÇİCİ (HIGH / LOW) ── */
.quality-selector-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 2px;
    flex-wrap: wrap;
    z-index: 2;
}

.quality-selector-lbl {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #94a3b8;
}

.quality-switch-group {
    display: flex;
    align-items: center;
    background: rgba(11, 19, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    padding: 3px;
    gap: 4px;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5);
}

.btn-quality-pill {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
    user-select: none;
    -webkit-user-select: none;
}

.btn-quality-pill:hover {
    color: #ffffff;
}

.btn-quality-pill.active {
    background: rgba(0, 240, 255, 0.18);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.btn-quality-pill#btn-quality-low.active {
    background: rgba(250, 204, 21, 0.18);
    border-color: #facc15;
    color: #facc15;
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
}

.btn-quality-pill .q-icon {
    font-size: 0.85rem;
    line-height: 1;
}

/* Sol Alt Slither.io "Change Skin" (Gövde Tasarla) Butonu */
.btn-change-skin-slither {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    border-radius: 40px;
    padding: 8px 22px 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    z-index: 50;
    user-select: none;
    -webkit-user-select: none;
}

.btn-change-skin-slither * {
    pointer-events: none;
}

.btn-change-skin-slither:hover {
    transform: translateY(-2px) scale(1.04);
    border-color: #00f0ff;
    box-shadow: 0 0 28px rgba(0, 240, 255, 0.55);
    background: rgba(15, 23, 42, 0.95);
}

.skin-bubble-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f0ff, #ff00aa);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    flex-shrink: 0;
}

.skin-bubble-circle svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

.skin-bubble-text {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #e2e8f0;
    white-space: nowrap;
}

/* Sağ Alt "Başarımlar" Butonu */
.btn-achievements-slither {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(250, 204, 21, 0.45);
    border-radius: 40px;
    padding: 8px 18px 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    z-index: 50;
    user-select: none;
    -webkit-user-select: none;
}

.btn-achievements-slither * {
    pointer-events: none;
}

.btn-achievements-slither:hover {
    transform: translateY(-2px) scale(1.04);
    border-color: #facc15;
    box-shadow: 0 0 28px rgba(250, 204, 21, 0.55);
    background: rgba(15, 23, 42, 0.95);
}

.ach-bubble-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15 0%, #ff8800 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
    flex-shrink: 0;
}

.ach-btn-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.ach-bubble-text {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #f8fafc;
    white-space: nowrap;
}

.ach-count-pill {
    background: rgba(250, 204, 21, 0.2);
    border: 1px solid rgba(250, 204, 21, 0.5);
    color: #fde047;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
}

.slither-footer-credits {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: #475569;
    letter-spacing: 1px;
    white-space: nowrap;
    pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   2. GENİŞ VE FERAH GÖVDE TASARLAMA EKRANI (SLITHER.IO ÖZELLEŞTİRİCİ)
   ══════════════════════════════════════════════════════════════ */
#skin-customizer-screen {
    background: radial-gradient(circle at 50% 50%, rgba(9, 19, 34, 0.98) 0%, rgba(4, 6, 11, 0.99) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
}

/* Üst Bar */
.cust-top-bar {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 8px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 25;
}

.btn-cust-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cust-nav svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-cust-nav:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: #00f0ff;
    color: #ffffff;
}

.cust-main-heading {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #00f0ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-cust-reset {
    background: rgba(255, 42, 95, 0.12);
    border: 1px solid rgba(255, 42, 95, 0.45);
    border-radius: 20px;
    padding: 6px 14px;
    color: #ff2a5f;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cust-reset:hover {
    background: rgba(255, 42, 95, 0.28);
    transform: scale(1.04);
}

/* Karartma Katmanı (İptal edildi - merkez sahne asla karartılmaz, yılan her zaman görünür) */
.drawer-backdrop {
    display: none !important;
}

/* ── ATÖLYE ÇALIŞMA ALANI ── */
.cust-workshop-layout {
    position: relative;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
}

/* ── MERKEZ SAHNE (CANLI YILAN, SLOTLAR & BUTONLAR) ── */
.cust-center-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    gap: 8px;
    z-index: 10;
    overflow-y: auto;
    scrollbar-width: none;
    transition: flex 0.28s ease, max-width 0.28s ease;
}

.cust-center-stage::-webkit-scrollbar {
    display: none;
}

/* Yan Çekmece Açma Çubuğu (Toolbar Triggers) */
.drawer-trigger-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.btn-drawer-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(0, 240, 255, 0.35);
    border-radius: 14px;
    padding: 7px 14px;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    user-select: none;
}

.btn-drawer-trigger:hover {
    border-color: #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.45);
    transform: translateY(-2px);
    background: rgba(15, 23, 42, 0.95);
}

.trigger-icon {
    font-size: 1.1rem;
}

.trigger-text {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.trigger-badge {
    background: rgba(0, 240, 255, 0.18);
    border: 1px solid #00f0ff;
    color: var(--neon-cyan);
    font-size: 0.65rem;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
}

.trigger-center-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #64748b;
    text-transform: uppercase;
}

/* Geniş Canlı Yılan Önizleme Sahnesi (PC'de aşağıya kadar tam boy uzanır) */
.cust-preview-stage {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 200px;
    background: radial-gradient(circle at center, #0a1424 0%, #040810 100%);
    border: 2px solid rgba(0, 240, 255, 0.4);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 240, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

#preview-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.preview-stage-label {
    position: absolute;
    bottom: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* Gövde Deseni Slotları (1-20) */
.cust-slots-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.pattern-slots-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px;
    max-width: 100%;
}

.pattern-slots-wrapper::-webkit-scrollbar {
    display: none;
}

.pattern-slots-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.pattern-slot {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 4px #000;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.pattern-slot.active {
    border-color: #ffffff;
    box-shadow: 0 0 14px currentColor, 0 0 5px #ffffff;
    transform: scale(1.14);
    z-index: 2;
}

.pattern-slot .slot-del-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ff2a5f;
    color: #ffffff;
    font-size: 0.6rem;
    line-height: 15px;
    text-align: center;
    display: none;
    font-weight: 900;
    box-shadow: 0 0 5px rgba(255, 42, 95, 0.8);
}

.pattern-slot:hover .slot-del-btn {
    display: block;
}

.btn-add-slot {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 240, 255, 0.08);
    border: 2px dashed rgba(0, 240, 255, 0.45);
    color: var(--neon-cyan);
    font-size: 1.15rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.btn-add-slot:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--neon-cyan);
    transform: scale(1.08);
}

/* Alt Aksiyon Butonları */
.cust-bottom-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 2px;
}

.btn-slither-action {
    flex: 1;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cust-save {
    background: rgba(0, 240, 255, 0.12);
    border: 1.5px solid var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.btn-cust-save:hover {
    background: rgba(0, 240, 255, 0.24);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

.btn-cust-play {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 50%, #00f0ff 100%);
    color: #061118;
    box-shadow: 0 0 22px rgba(0, 255, 136, 0.45);
}

.btn-cust-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(0, 255, 136, 0.7);
}

/* ── YAN ÇEKMECELER / PANELLER (DRAWERS: SOL VE SAĞ ATÖLYE PANELLERİ) ── */
.cust-drawer {
    background: rgba(11, 19, 34, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid rgba(0, 240, 255, 0.35);
    border-radius: 20px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

/* ── MASAÜSTÜ / PC MODU (min-width: 951px): HER ŞEY YAN YANA AÇIK VE FERAH! ── */
@media (min-width: 951px) {
    .drawer-trigger-bar {
        display: none !important;
    }
    .btn-drawer-close {
        display: none !important;
    }
    #skin-customizer-screen:not(.hidden) .cust-drawer {
        position: relative;
        flex: 0 0 260px;
        width: 260px;
        max-width: 260px;
        height: 100%;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }
    .cust-workshop-layout {
        max-width: 1400px;
        gap: 16px;
    }
    .cust-center-stage {
        justify-content: flex-start;
        gap: 12px;
    }
    .cust-preview-stage {
        flex: 1 1 auto;
        min-height: 380px;
        max-height: none !important; /* PC'de yılan alanı aşağıya kadar tam uzanır, boşluk kalmaz! */
    }
    .cust-slots-container {
        flex-shrink: 0;
        margin-top: 4px;
    }
    .cust-bottom-actions {
        flex-shrink: 0;
        margin-top: 2px;
    }
}

/* ── MOBİL / TABLET / DAR EKRAN MODU (max-width: 950px): AÇILDIĞINDA MERKEZİ İTTİRİR VE KÜÇÜLTÜR! ── */
@media (max-width: 950px) {
    .cust-preview-stage {
        max-height: 230px;
        min-height: 140px;
    }
    .drawer-trigger-bar {
        display: flex;
    }
    .btn-drawer-trigger.active {
        border-color: #00f0ff;
        background: rgba(0, 240, 255, 0.22);
        box-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
    }
    .cust-workshop-layout {
        gap: 8px;
    }
    .cust-drawer {
        position: relative;
        height: 100%;
        /* Varsayılan kapalı: genişlik 0, merkez sahne %100 kaplar */
        flex: 0 0 0px;
        width: 0;
        min-width: 0;
        max-width: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        margin: 0;
        padding: 0;
        border: none;
        transition: flex-basis 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), max-width 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.22s ease, margin 0.28s ease, padding 0.28s ease;
    }
    .cust-drawer.open {
        flex: 0 0 240px;
        width: 240px;
        max-width: 240px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        border: 1.5px solid rgba(0, 240, 255, 0.4);
        border-radius: 18px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 240, 255, 0.15);
    }
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.3) transparent;
}

.drawer-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.drawer-section-title {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #94a3b8;
    margin-bottom: 8px;
}

/* 32 Renkli Palet Izgarası (Çekmece İçi: 4x8 Düzen) */
.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-items: center;
    padding: 2px;
}

.swatch-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.swatch-btn:hover {
    transform: scale(1.22);
    border-color: #ffffff;
    box-shadow: 0 0 16px currentColor;
    z-index: 3;
}

.swatch-btn.active {
    border-color: #ffffff;
    box-shadow: 0 0 18px currentColor, 0 0 6px #ffffff;
    transform: scale(1.18);
    z-index: 2;
}

/* Obsidyen Siyah Kürenin Palet Üzerinde Parlaması */
.swatch-btn[data-hex="#0b111e"] {
    border: 2px solid rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.swatch-btn[data-hex="#0b111e"]:hover {
    border-color: #00f0ff;
    box-shadow: 0 0 18px #00f0ff;
}

.swatch-btn[data-hex="#0b111e"].active {
    border-color: #00f0ff;
    box-shadow: 0 0 22px #00f0ff, 0 0 8px #ffffff;
}

/* Hazır Temalar Listesi */
.presets-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.preset-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 6px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preset-chip:hover {
    background: rgba(0, 240, 255, 0.18);
    border-color: var(--neon-cyan);
    color: #ffffff;
    transform: translateY(-1px);
}

.preset-chip.active {
    background: rgba(0, 240, 255, 0.22);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

/* Nabız Işıması Grid (8 adet) */
.pulse-styles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.pulse-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 6px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}

.pulse-chip:hover {
    color: #ffffff;
    border-color: rgba(0, 240, 255, 0.5);
}

.pulse-chip.active {
    background: rgba(0, 240, 255, 0.18);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* ══════════════════════════════════════════════════════════════
   3. MOBİL VE TELEFON STANDARTLARI (YATAY & DİKEY)
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
    .btn-nitro {
        display: flex;
    }
}

body.touch-device .btn-nitro {
    display: flex;
}

@media (max-width: 768px) {
    .radar-container {
        top: 10px;
        left: 10px;
        width: 76px;
        height: 76px;
    }
    .top-right-bar {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    .fps-chip {
        font-size: 0.65rem;
        padding: 3px 7px;
    }
    .icon-btn {
        width: 32px;
        height: 32px;
    }
    .btn-nitro {
        width: 72px;
        height: 72px;
        right: 18px;
        bottom: 18px;
    }
    .mobile-controls-hint {
        display: none;
    }
}

/* Telefon Yatay Mod (max-height: 540px) */
@media (orientation: landscape) and (max-height: 540px), (max-width: 950px) and (max-height: 540px) {
    /* Ana Menü Yatay */
    .slither-brand-title {
        font-size: 2.3rem;
        letter-spacing: 2px;
        margin-bottom: 2px;
    }
    .slither-tagline {
        font-size: 0.62rem;
        letter-spacing: 2.5px;
    }
    .menu-brand {
        margin-bottom: 12px;
    }
    .menu-action-panel {
        gap: 8px;
    }
    .slither-input {
        padding: 8px 16px;
        font-size: 0.95rem;
    }
    .btn-slither-play {
        width: 150px;
        height: 42px;
        font-size: 1.2rem;
    }
    .slither-controls-hint {
        font-size: 0.62rem;
        margin-top: 2px;
    }
    .btn-change-skin-slither {
        bottom: 12px;
        left: 14px;
        padding: 6px 14px 6px 8px;
        gap: 8px;
    }
    .skin-bubble-circle {
        width: 30px;
        height: 30px;
    }
    .skin-bubble-circle svg {
        width: 16px;
        height: 16px;
    }
    .skin-bubble-text {
        font-size: 0.75rem;
    }
    .slither-footer-credits {
        bottom: 6px;
        font-size: 0.58rem;
    }

    /* Özel Tasarımcı Yatay */
    #skin-customizer-screen {
        padding: 6px 10px;
    }
    .cust-top-bar {
        margin-bottom: 4px;
    }
    .cust-main-heading {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }
    .btn-cust-nav, .btn-cust-reset {
        padding: 4px 10px;
        font-size: 0.68rem;
    }
    .drawer-trigger-bar {
        gap: 6px;
    }
    .btn-drawer-trigger {
        padding: 5px 10px;
        border-radius: 10px;
    }
    .trigger-text {
        font-size: 0.72rem;
    }
    .cust-preview-stage {
        height: 135px;
        min-height: 110px;
        border-radius: 14px;
    }
    .pattern-slot, .btn-add-slot {
        width: 26px;
        height: 26px;
        font-size: 0.62rem;
    }
    .btn-slither-action {
        padding: 8px 12px;
        font-size: 0.82rem;
        border-radius: 10px;
    }
    .cust-drawer.open {
        flex: 0 0 215px !important;
        width: 215px !important;
        max-width: 215px !important;
    }
    .swatch-btn {
        width: 32px;
        height: 32px;
    }
    .color-palette-grid {
        gap: 6px;
    }
    .drawer-content {
        padding: 8px 10px;
        gap: 8px;
    }

    /* Game Over Yatay */
    .modal-card {
        padding: 12px 18px;
        max-width: 520px;
        border-radius: 14px;
    }
    .modal-title {
        font-size: 1.25rem;
        margin-bottom: 2px;
    }
    .modal-subtitle {
        font-size: 0.68rem;
        margin-bottom: 8px;
    }
    .modal-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-bottom: 10px;
    }
    .stat-box {
        padding: 5px 4px;
    }
    .stat-box .val {
        font-size: 1.05rem;
    }
    .stat-box .lbl {
        font-size: 0.55rem;
    }
    .modal-buttons-row {
        gap: 8px;
    }
    .btn-restart, .btn-menu-return {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Telefon Dikey Mod (max-width: 540px and portrait) */
@media (max-width: 540px) and (orientation: portrait), (max-width: 480px) {
    .slither-brand-title {
        font-size: 2.3rem;
        letter-spacing: 2px;
    }
    .slither-tagline {
        font-size: 0.65rem;
        letter-spacing: 2.5px;
    }
    .btn-change-skin-slither {
        bottom: 16px;
        left: 14px;
        transform: none;
        padding: 6px 14px 6px 8px;
    }
    .btn-change-skin-slither:hover {
        transform: translateY(-2px) scale(1.03);
    }
    .btn-achievements-slither {
        bottom: 16px;
        right: 14px;
        transform: none;
        padding: 6px 14px 6px 8px;
    }
    .btn-achievements-slither:hover {
        transform: translateY(-2px) scale(1.03);
    }
    .skin-bubble-text, .ach-bubble-text {
        font-size: 0.75rem;
    }
    .slither-footer-credits {
        display: none;
    }

    .mode-buttons-row {
        gap: 8px;
        max-width: 330px;
    }
    .btn-mode {
        font-size: 0.82rem;
        height: 48px;
        letter-spacing: 0.5px;
    }
    .mode-icon {
        font-size: 1rem;
    }
    .mode-badge-soon {
        font-size: 0.5rem;
        padding: 2px 4px;
    }

    /* Üst Bar Başlık ve Butonlar - Mobilde Başlık Üstte, Butonlar Yanlarda Temiz Düzen */
    .cust-top-bar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        margin-bottom: 6px;
    }
    .cust-main-heading {
        order: -1;
        width: 100%;
        text-align: center;
        font-size: 1.1rem;
        letter-spacing: 1.5px;
        white-space: nowrap;
        margin-bottom: 2px;
    }
    .btn-cust-nav, .btn-cust-reset {
        padding: 5px 12px;
        font-size: 0.72rem;
    }

    .cust-preview-stage {
        height: 180px;
        min-height: 150px;
    }
    .cust-drawer.open {
        flex: 0 0 54% !important;
        width: 54% !important;
        max-width: 54% !important;
    }
    .swatch-btn {
        width: 30px;
        height: 30px;
    }
    .color-palette-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .drawer-content {
        padding: 8px;
        gap: 8px;
    }
    .cust-bottom-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .btn-slither-action {
        width: 100%;
        padding: 12px 14px;
    }

    /* Başarımlar Modal Paneli - Mobil */
    .achievements-card {
        padding: 14px 12px !important;
        max-height: 90vh;
        border-radius: 16px;
    }
    .ach-modal-header {
        gap: 8px;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
    .ach-title-text {
        font-size: 1.15rem !important;
    }
    .ach-modal-sub {
        font-size: 0.68rem;
    }
    .ach-modal-icon {
        font-size: 1.6rem;
    }
    .ach-stat-chip {
        padding: 3px 6px;
        font-size: 0.68rem;
    }
    .ach-item {
        padding: 8px 10px;
        gap: 10px;
    }
    .ach-item-icon {
        width: 34px;
        height: 34px;
        font-size: 1.3rem;
    }
    .ach-item-title {
        font-size: 0.84rem;
    }
    .ach-item-desc {
        font-size: 0.68rem;
    }

    /* Mobil Kalite Seçici */
    .quality-selector-row {
        gap: 6px;
        margin-top: 2px;
        margin-bottom: 2px;
    }
    .quality-selector-lbl {
        font-size: 0.65rem;
    }
    .btn-quality-pill {
        padding: 4px 8px;
        font-size: 0.65rem;
        gap: 3px;
    }
    .btn-quality-pill .q-icon {
        font-size: 0.72rem;
    }
}

/* ══════════════════════════════════════════════════════════════
   4. DÜŞÜK GRAFİK KALİTESİ (LOW QUALITY / MOBİL PERFORMANS MODU)
   Tüm binen GPU yükleri, parıltılar, neon auralar ve blur filtreleri
   sıfırlanır, telefonlarda ve düşük donanımlarda ultra akıcılık sağlanır.
   ══════════════════════════════════════════════════════════════ */
body.low-graphics * {
    text-shadow: none !important;
}

body.low-graphics .screen-overlay,
body.low-graphics .modal-overlay,
body.low-graphics .leaderboard-panel,
body.low-graphics .fps-chip,
body.low-graphics .icon-btn,
body.low-graphics .quality-hud-btn,
body.low-graphics .achievement-toast,
body.low-graphics .btn-change-skin-slither,
body.low-graphics .btn-achievements-slither,
body.low-graphics .modal-card,
body.low-graphics .achievements-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

body.low-graphics #main-menu-screen {
    background: #06080d !important;
}

body.low-graphics .modal-overlay {
    background: rgba(6, 8, 13, 0.96) !important;
}

body.low-graphics .modal-card,
body.low-graphics .achievements-card {
    background: #0b111e !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
}

body.low-graphics .play-glow,
body.low-graphics .toast-glow {
    display: none !important;
}

body.low-graphics .btn-slither-play {
    box-shadow: none !important;
}

body.low-graphics .btn-mode {
    box-shadow: none !important;
}


