:root {
    --primary-color: #ffcc00;
    --secondary-color: #ffcc00;
    --bg-color: #000000;
    --card-bg: #111111;
    --text-color: #ffffff;
    --surface-soft: #161616;
    --surface-deep: #090909;
    --input-bg: #222222;
    --border-color: #333333;
    --muted-text: #aaaaaa;
    --danger-surface: #1f0707;
    --danger-text: #fca5a5;
}

body { 
    font-family: 'Segoe UI', sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    margin: 0; 
    padding: 0; 
    min-height: 100vh;
}

/* Açılır-Kapanır Hamburger Menü (Sidebar) */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 280px;
    height: 100%;
    box-sizing: border-box;
    background: #0a0a0a;
    border-right: 1px solid #222;
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    transition: left 0.3s ease;
}

.sidebar.open {
    left: 0;
}

.sidebar h2 {
    color: var(--primary-color);
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.nav-btn {
    background: #111;
    color: #fff;
    border: 1px solid #333;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.95em;
    display: block;
    white-space: nowrap;
}

.nav-btn:hover, .nav-btn.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

/* Her Sayfada Sabit Hamburger Buton */
.menu-trigger-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    background: #111;
    color: var(--primary-color);
    border: 1px solid #333;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    z-index: 9998;
    width: auto;
    margin: 0;
}
.menu-trigger-btn:hover { background: #222; }

/* Sağ İçerik Alanı */
.main-content {
    padding: 20px;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container { width: 100%; max-width: 650px; margin-bottom: 30px; }
.card { background: var(--card-bg); border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.8); margin-bottom: 20px; border: 1px solid #222; }
.match-card-row { background: #1a1a1a; border: 1px solid #333; border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.match-main { display: flex; justify-content: space-between; align-items: center; }
.team { width: 35%; font-weight: bold; } .team.home { text-align: right; } .team.away { text-align: left; }
.vs { width: 14%; text-align: center; color: var(--secondary-color); font-weight: bold; font-size: 1.05em; }
.prediction-inputs { display: flex; gap: 6px; align-items: center; }
select, input { background: #333; color: #fff; border: 1px solid #555; padding: 6px; border-radius: 6px; text-align: center; }
button { background-color: var(--secondary-color); color: #000; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; width: 100%; margin-top: 10px; }
button:hover { background-color: #e6b800; }

.global-save-btn { background-color: #00ffcc; color: #000; font-size: 1.1em; padding: 15px; margin-top: 15px; letter-spacing: 1px; }
.global-save-btn:hover { background-color: #00cc99; }

.time-badge { font-size: 0.85em; margin-top: 6px; text-align: center; display: block; font-family: monospace; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 10px; text-align: center; border-bottom: 1px solid #444; }
th { color: var(--secondary-color); }
.hidden { display: none !important; }
.admin-section { border: 2px dashed #ff3333; }

.user-buttons-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; margin-bottom: 15px; }
.user-select-btn { background: #333; color: #fff; padding: 8px 12px; border-radius: 20px; border: 1px solid #555; font-size: 0.9em; width: auto; margin-top: 0; cursor: pointer; }
.user-select-btn:hover, .user-select-btn.active { background: var(--secondary-color); color: #000; border-color: var(--secondary-color); }
.filtered-pred-box { background: #1a1a1a; padding: 10px; border-radius: 8px; margin-bottom: 8px; border-left: 4px solid var(--secondary-color); font-size: 0.95em; display: flex; justify-content: space-between; align-items: center; }

.section-header-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed #444; padding-bottom: 8px; margin-bottom: 15px; }
.section-header-row h3 { margin: 0; }
.toggle-container { display: flex; align-items: center; gap: 8px; }
.toggle-label { font-size: 0.85em; color: #aaa; font-weight: bold; }
.switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #444; transition: .3s; border-radius: 24px; border: 1px solid #555; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
input:checked + .slider { background-color: #00ffcc; border-color: #00ffcc; box-shadow: 0 0 8px rgba(0,255,204,0.6); }
input:checked + .slider:before { transform: translateX(20px); }

.lig-table th, .lig-table td { padding: 8px 4px; font-size: 0.88em; }
.lig-table td:nth-child(2) { text-align: left; padding-left: 8px; font-weight: 500; }

/* Profil Özel İstatistik Kartları */
.stats-grid { display: flex; gap: 10px; margin-top: 15px; margin-bottom: 15px; justify-content: space-between; width: 100%; }
.stat-box { background: #1a1a1a; border: 1px solid #333; padding: 12px; border-radius: 8px; text-align: center; width: 31%; }
.stat-box .num { font-size: 1.5em; font-weight: bold; color: var(--secondary-color); display: block; margin-top: 4px; }
.stat-box .lbl { font-size: 0.78em; color: #aaa; font-weight: bold; display: block; }

.detail-row { display: flex; justify-content: space-between; align-items: center; background: #161616; padding: 12px; border-radius: 8px; margin-bottom: 10px; border-left: 3px solid #ffcc00; }
.detail-info { display: flex; flex-direction: column; gap: 2px; }
.detail-title { font-weight: bold; font-size: 0.95em; }
.detail-desc { font-size: 0.8em; color: #888; }
.detail-badge { background: #222; border: 1px solid #444; padding: 5px 10px; border-radius: 6px; font-size: 0.9em; font-weight: bold; color: #00ffcc; text-align: center; min-width: 75px; }

.form-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; text-align: center; line-height: 18px; font-size: 0.7em; font-weight: bold; color: #000; margin-right: 5px; }
.form-dot.win { background: #00ffcc; }
.form-dot.loss { background: #ff3333; }
/* =========================================================
   ANALİZ SAHASI - MOBİL MAÇ KARTI DÜZENLEMESİ
   Takım ve tahmin alanlarının ekran dışına taşmasını engeller
   ========================================================= */

@media screen and (max-width: 600px) {

    .main-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .container {
        max-width: 100%;
    }

    #prediction-card {
        padding-left: 12px;
        padding-right: 12px;
    }

    #prediction-card > h3 {
        font-size: 1.15em;
        text-align: center;
        line-height: 1.35;
    }

    .match-card-row {
        padding: 12px 8px;
        overflow: hidden;
    }

    /* Mobilde maç kartını satırlara ayırır */
    .match-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        justify-content: initial;
        column-gap: 6px;
        row-gap: 10px;
        width: 100%;
        min-width: 0;
    }

    /* Ev sahibi */
    .match-main .team.home {
        grid-column: 1;
        grid-row: 1;
        width: auto;
        min-width: 0;
        text-align: right;
    }

    /* VS yazısı */
    .match-main .vs {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        min-width: auto;
        padding: 0 2px;
        text-align: center;
        white-space: nowrap;
    }

    /* Deplasman takımı */
    .match-main .team.away {
        grid-column: 3;
        grid-row: 1;
        width: auto;
        min-width: 0;
        text-align: left;
    }

    /* Uzun takım isimleri güvenli şekilde alt satıra iner */
    .match-main .team {
        font-size: clamp(16px, 4.6vw, 20px);
        line-height: 1.15;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    /* Analiz Et butonu ayrı satıra alınır */
    .match-main .g3-analyze-btn {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
        width: auto !important;
        max-width: none;
        margin: 0 !important;
        padding: 7px 14px;
        font-size: 0.82em;
        white-space: nowrap;
    }

    /* Skor tahmin alanı üçüncü satıra alınır */
    .match-main .prediction-inputs {
        grid-column: 1 / -1;
        grid-row: 3;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        width: 100%;
        min-width: 0;
        gap: 7px;
    }

    .match-main .score-input-group {
        justify-content: center;
        margin: 0;
    }

    .match-main .score-input-group input {
        width: 52px !important;
        max-width: 52px;
        height: 38px;
        box-sizing: border-box;
        font-size: 16px;
    }

    /* Tarih ve geri sayımı kartın içine sığdırır */
    .match-card-row .time-badge {
        width: 100%;
        box-sizing: border-box;
        margin-top: 12px;
        padding: 0 4px;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    /* Açılan analiz paneli de taşmasın */
    .g3-analyze-panel {
        max-width: 100%;
        overflow-x: auto;
    }

    .analyze-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
