/* assets/css/style.css - Responsive Refactor */

/* --- TASARIM AYARLARI --- */
:root {
    --red-brand: #ad0909;
    --red-dark: #7a0606;
    --bg-black: #000000;
    --card-black: #0a0a0a;
    --border: #222222;
    --text-white: #ffffff;
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
}

* {
    box-sizing: border-box;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--red-brand);
    outline-offset: 3px;
    border-radius: inherit;
}

.corgen-game-wrapper button,
.corgen-game-wrapper input,
.corgen-game-wrapper select,
.corgen-game-wrapper textarea,
.corgen-game-wrapper a,
.corgen-game-wrapper div,
.corgen-game-wrapper .mode-btn,
.corgen-game-wrapper .ans-btn,
.corgen-game-wrapper .btn-main,
.corgen-game-wrapper .btn-outline {
    -webkit-tap-highlight-color: transparent !important;
}

/* ANA WRAPPER */
.corgen-game-wrapper {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* HEADER */
.header-box {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
    padding-top: 10px;
    width: 100%;
}

.header-box h1 {
    font-size: clamp(32px, 6vw, 45px);
    font-weight: 900;
    margin: 0;
    line-height: 1;
    letter-spacing: -1px;
    color: #ffffff;
}

.header-box h1 span {
    color: var(--red-brand);
}

.header-box p {
    font-size: clamp(11px, 2vw, 14px);
    letter-spacing: clamp(2px, 0.5vw, 4px);
    color: #ffffff;
    font-weight: 700;
    margin-top: 10px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* LOGO RESMİ */
.header-logo {
    max-width: clamp(160px, 30vw, 250px);
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 0 15px rgba(173, 9, 9, 0.5));
}

/* --- ANA YERLEŞİM --- */
.main-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    position: relative;
    margin: 0 auto;
}

/* OYUN ALANI (ORTA) */
.app-box {
    width: 100%;
    max-width: 500px;
    padding: 0;
    position: relative;
    z-index: 10;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* LİDERLİK TABLOSU */
.leaderboard-column {
    width: 100%;
    display: none;
    margin-top: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* KARTLAR */
.black-panel {
    background: var(--card-black);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* BUTONLAR */
.btn-main {
    width: 100%;
    padding: 20px;
    background: var(--red-brand);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: clamp(15px, 2.5vw, 18px);
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    transition: 0.2s;
    margin-top: 12px;
}

.btn-main:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
}

.btn-outline {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 1px solid #333;
    color: #888;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    font-size: 14px;
}

.btn-outline:hover,
.btn-outline:focus,
.btn-outline:active {
    border-color: #ffffff !important;
    color: #ffffff !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* MOD SEÇİM */
.mode-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--red-brand);
    border: 2px solid var(--red-brand);
    padding: clamp(20px, 4vw, 30px);
    border-radius: 18px;
    margin-bottom: 18px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(173, 9, 9, 0.3);
}

.mode-btn:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-2px);
}

.mode-btn h3 {
    margin: 0;
    font-size: clamp(18px, 3vw, 22px);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
}

.mode-btn p {
    margin: 6px 0 0;
    font-size: clamp(12px, 2vw, 14px);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* BÖLGE SEÇİMİ */
.grid-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 2vw, 15px);
}

.region-btn {
    background: #050505;
    border: 2px solid var(--red-brand);
    color: #fff;
    padding: clamp(16px, 3vw, 22px) 12px;
    border-radius: 14px;
    font-weight: 700;
    font-size: clamp(12px, 2vw, 15px);
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60px;
}

.region-btn:hover {
    background: var(--red-brand);
    box-shadow: 0 0 15px rgba(173, 9, 9, 0.4);
}

/* INPUT */
.login-input {
    width: 100%;
    background: #000;
    border: 2px solid #333;
    padding: clamp(16px, 3vw, 22px);
    color: white;
    font-size: clamp(16px, 3vw, 19px);
    font-weight: 700;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 18px;
    transition: 0.3s;
    outline: none;
}

.login-input:focus {
    border-color: var(--red-brand);
}

/* OYUN EKRANI */
.hud {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #222;
    padding-bottom: 18px;
    margin-bottom: 30px;
}

.hud-label {
    font-size: 11px;
    color: #666;
    font-weight: 800;
    letter-spacing: 1px;
}

.hud-val {
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 800;
    color: white;
}

.question-text {
    font-size: clamp(18px, 3.5vw, 24px);
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
    color: #eee;
    margin-bottom: 35px;
}

.answer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(10px, 2vw, 15px);
}

.ans-btn {
    width: 100%;
    background: #141414;
    border: 1px solid #333;
    padding: clamp(16px, 3vw, 22px);
    border-radius: 14px;
    color: #ccc;
    font-weight: 600;
    font-size: clamp(14px, 2.5vw, 17px);
    text-transform: lowercase;
    display: inline-block;
    cursor: pointer;
    transition: 0.2s;
}

.ans-btn::first-letter {
    text-transform: uppercase;
}

.ans-btn:hover {
    border-color: var(--red-brand);
    color: white;
    padding-left: 30px;
    background: #1f0505;
}

.ans-btn.correct {
    background: #1e3a21 !important;
    border-color: #2ecc71 !important;
    color: #fff !important;
}

.ans-btn.wrong {
    background: #3a1e1e !important;
    border-color: #e74c3c !important;
    color: #fff !important;
}

/* SSS BUTONU - app-box (siyah alan) içinde sağ üst */
.faq-trigger {
    position: absolute;
    top: 12px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 50;
    font-size: 16px;
}

.faq-trigger:hover {
    background: var(--red-brand);
    border-color: var(--red-brand);
}

.modal-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: #111;
    border: 1px solid #333;
    border-radius: 20px;
    padding: clamp(20px, 4vw, 35px);
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    width: 100%;
}

.modal-box h3 {
    color: var(--red-brand);
    margin-top: 0;
    font-size: clamp(18px, 3vw, 24px);
}

.modal-box p {
    font-size: clamp(13px, 2vw, 15px);
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* LİDERLİK TABLOSU STİLLERİ */
.lb-header {
    background: var(--red-brand);
    color: white;
    padding: 18px;
    border-radius: 18px 18px 0 0;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--red-brand);
    font-size: clamp(12px, 2vw, 15px);
}

.lb-body {
    background: #050505;
    border: 1px solid #222;
    border-top: none;
    border-radius: 0 0 18px 18px;
    max-height: 650px;
    overflow-y: auto;
}

.lb-row {
    display: flex;
    justify-content: space-between;
    height: auto !important;
    min-height: 45px !important;
    padding: 8px 15px;
    border-bottom: 1px solid #1a1a1a;
    font-size: 14px;
    align-items: center;
    color: #ccc;
}

.lb-row:last-child {
    border-bottom: none;
}

.empty-row {
    color: #333;
    font-style: italic;
}

.rank-num {
    font-weight: 900;
    width: 35px;
    flex-shrink: 0;
}

.player-info {
    flex-grow: 1;
    font-weight: 600;
    color: #ccc;
    text-align: left;
    padding-left: 12px;
    padding-right: 8px;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-wrap: break-word !important;
    line-height: 1.2 !important;
}

.player-score {
    font-weight: 800;
    color: white;
    width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.rank-1 {
    color: var(--gold) !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.rank-2 {
    color: var(--silver) !important;
}

.rank-3 {
    color: var(--bronze) !important;
}

.is-me {
    background: rgba(173, 9, 9, 0.15);
    border-left: 3px solid var(--red-brand);
}

.hidden {
    display: none !important;
}

/* =========================================================
   RADYO KUTUSU
   ========================================================= */
.radio-box {
    position: absolute;
    top: clamp(10px, 2vw, 30px);
    left: clamp(10px, 2vw, 30px);
    width: clamp(280px, 25vw, 400px);
    z-index: 100;
    padding: clamp(12px, 1.5vw, 20px);
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.radio-title {
    color: #fff;
    font-weight: 800;
    font-size: clamp(11px, 1.2vw, 14px);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.radio-select {
    width: 100%;
    padding: clamp(10px, 1.5vw, 16px);
    font-size: clamp(11px, 1.2vw, 14px);
    font-weight: 700;
    color: var(--text-white);
    background: #111;
    border: 2px solid var(--red-brand);
    border-radius: 12px;
    cursor: pointer;
}

.radio-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 12px;
}

.radio-label {
    color: #888;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.radio-unlock-btn {
    width: 100%;
    padding: clamp(8px, 1.2vh, 14px);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff !important;
    background-color: #ad0909 !important;
    background: #ad0909 !important;
    border: none !important;
    outline: none !important;
    border-radius: 3px;
    cursor: pointer;
    transition: 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

.radio-unlock-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(173, 9, 9, 0.6);
}

.radio-volume-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #222;
    border-radius: 5px;
    cursor: pointer;
}

.radio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--red-brand);
}

.radio-status,
.radio-unlock-banner {
    margin-top: 8px;
    font-size: 12px;
    color: #fff;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: normal;
}

.radio-unlock-banner {
    color: #ffaa00;
    font-weight: 700;
}

/* SCROLLBARS */
::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--red-brand);
    border-radius: 6px;
}

/* =========================================================
   MOBİL (480px ve altı - Küçük telefonlar)
   ========================================================= */
@media (max-width: 480px) {
    .corgen-game-wrapper {
        padding: 8px !important;
    }

    .header-box {
        padding-top: 30px !important;
        margin-bottom: 10px !important;
    }

    .header-logo {
        max-width: 160px !important;
    }

    .app-box {
        width: 100% !important;
        padding-bottom: 40px !important;
    }

    .black-panel {
        padding: 18px;
        border-radius: 16px;
    }

    .btn-main {
        padding: 16px;
        font-size: 15px;
    }

    .question-text {
        font-size: 17px;
        margin-bottom: 20px;
    }

    .ans-btn {
        padding: 16px;
        font-size: 14px;
    }

    .region-btn {
        min-height: 50px;
        padding: 14px 8px;
        font-size: 12px;
    }

    .faq-trigger {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* =========================================================
   MOBİL (768px ve altı)
   ========================================================= */
@media (max-width: 768px) {
    .corgen-game-wrapper {
        padding: 10px !important;
        margin: 0 !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .header-box {
        width: 100% !important;
        padding-top: 40px !important;
        margin-bottom: 15px !important;
    }

    .header-logo {
        max-width: 200px !important;
        height: auto !important;
        margin-bottom: 10px !important;
    }

    .app-box {
        width: 96% !important;
        margin: 0 auto !important;
        padding-bottom: 50px !important;
    }

    .radio-box {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0 auto 15px !important;
        backdrop-filter: none !important;
        background: var(--card-black) !important;
        border-radius: 16px !important;
    }

    .leaderboard-column {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
        max-height: none !important;
        margin-top: 20px !important;
        opacity: 1 !important;
        overflow-y: visible !important;
    }

    /* SSS butonu - fixed olduğu için mobilde özel ayar gerekmez */
}

/* Leaderboard sağa sabit - JS tarafından eklenen class */
.lb-fixed {
    position: absolute !important;
    top: -50px !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 !important;
    z-index: 9999 !important;
}

/* =========================================================
   TABLET (769px - 1024px)
   ========================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-wrapper {
        max-width: 700px;
    }

    .app-box {
        max-width: 520px;
    }

    .leaderboard-column {
        position: absolute !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 520px !important;
        max-height: none !important;
        margin: 20px auto 0 !important;
        opacity: 1 !important;
    }

    .radio-box {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 520px !important;
        margin: 0 auto 20px !important;
        backdrop-filter: none !important;
        background: var(--card-black) !important;
    }
}

/* =========================================================
   PC (1025px ve üstü)
   ========================================================= */
@media (min-width: 1025px) {
    .corgen-game-wrapper {
        justify-content: flex-start;
        padding-top: 30px;
    }

    .main-wrapper {
        width: 100%;
        max-width: 100%;
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        position: relative;
        min-height: 600px;
    }

    .app-box {
        max-width: 500px;
        flex-shrink: 0;
    }

    .leaderboard-column {
        width: 320px !important;
    }
}

/* =========================================================
   BÜYÜK EKRANLAR (1440px ve üstü - 2K, 4K)
   ========================================================= */
@media (min-width: 1440px) {
    .leaderboard-column {
        width: 350px !important;
    }

    .radio-box {
        width: clamp(350px, 22vw, 450px);
    }
}

@media (min-width: 2560px) {
    .leaderboard-column {
        width: 380px !important;
    }

    .header-box h1 {
        font-size: 50px;
    }
}