:root {
    color-scheme: dark;
    --bg: #0d0f13;
    --surface: #171b21;
    --border: #262c34;
    --text: #e6e8eb;
    --text-muted: #9aa1a9;
    --accent: #4f8cff;
    --danger: #ff5a68;
    --success: #3ecf8e;
    --radius: 12px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.logo { font-weight: 700; font-size: 18px; color: var(--text); }
.main-nav { display: flex; gap: 20px; }
.main-nav a { color: var(--text-muted); font-size: 14px; }
.header-search input {
    padding: 6px 12px; margin: 0; width: 140px;
    background: #0d1014; border: 1px solid #2c333c; border-radius: 999px;
    color: var(--text); font-size: 13px;
}
@media (max-width: 860px) { .header-search { display: none; } }
.header-actions { display: flex; gap: 10px; align-items: center; }
.user-chip { font-size: 14px; color: var(--text); }
.notif-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 999px; padding: 1px 5px; line-height: 1.4;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #3d78e6; text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; text-align: center; }

/* ===== FLASH ===== */
.flash { padding: 12px 14px; border-radius: 8px; margin: 16px 0; font-size: 14px; }
.flash-error   { background: #3a1a1e; border: 1px solid #5c2a30; color: #ff9aa5; }
.flash-success { background: #163a24; border: 1px solid #22572f; color: #7be89a; }
.flash-warn    { background: #3a2f14; border: 1px solid #57451f; color: #e8c17b; }

/* ===== FORM ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
label { display: block; font-size: 13px; margin-bottom: 6px; color: #c3c8cf; }
input, select, textarea {
    width: 100%; padding: 10px 12px; margin-bottom: 14px;
    background: #0d1014; border: 1px solid #2c333c; border-radius: 8px;
    color: var(--text); font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.hint { font-size: 12px; color: #6e7580; margin-top: -8px; margin-bottom: 14px; }
.form-row { display: flex; gap: 12px; }
.form-row > div { flex: 1; }

/* ===== TABLO (admin) ===== */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge-active { background: #163a24; color: #7be89a; }
.badge-draft { background: #2a2e35; color: var(--text-muted); }
.badge-inactive { background: #3a1a1e; color: #ff9aa5; }
.badge-live { background: #163a24; color: #7be89a; }
.badge-scheduled { background: #1a2a3a; color: #7bb0e8; }
.badge-completed { background: #2a2e35; color: var(--text-muted); }

/* ===== STADYUM ===== */
.stadium {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
    margin: 20px 0;
}
.stadium-status {
    position: absolute; top: 14px; left: 14px;
    background: rgba(0,0,0,.55);
    padding: 4px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600; z-index: 2;
    display: flex; align-items: center; gap: 6px;
}
.live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--danger);
    animation: pulse 1.4s infinite;
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.scoreboard {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    padding: 50px 24px 20px;
}
.scoreboard-team { display: flex; align-items: center; gap: 10px; }
.scoreboard-team--b { flex-direction: row-reverse; }
.team-logo { width: 40px; height: 40px; object-fit: contain; }
.team-name { font-weight: 700; font-size: 15px; }
.scoreboard-score { display: flex; align-items: center; gap: 10px; font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
.score--a { color: var(--team-a-primary, #fff); }
.score--b { color: var(--team-b-primary, #fff); }
.score-sep { color: var(--text-muted); font-size: 20px; }

.stadium-pitch {
    position: relative; z-index: 1;
    display: flex; height: 90px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.supporter-section { transition: width .6s ease; }
.supporter-section--a { background: linear-gradient(180deg, var(--team-a-primary, #333), transparent); }
.supporter-section--b { background: linear-gradient(180deg, var(--team-b-primary, #333), transparent); }
.pitch-center {
    position: absolute; left: 50%; top: 0; bottom: 0;
    width: 2px; background: rgba(255,255,255,.15); transform: translateX(-50%);
}

/* ===== KARTLAR (takım/mücadele listeleri) ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }
.team-card, .battle-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; display: block; color: var(--text);
}
.team-card:hover, .battle-card:hover { border-color: var(--accent); text-decoration: none; }
.team-card img { width: 48px; height: 48px; object-fit: contain; margin-bottom: 10px; }
.team-card .team-city { font-size: 13px; color: var(--text-muted); }

.support-actions { display: flex; gap: 12px; margin: 16px 0; }
.support-actions .btn { flex: 1; }

.page-title { font-size: 24px; margin: 24px 0 4px; }
.page-sub { color: var(--text-muted); margin-bottom: 20px; font-size: 14px; }

.leaderboard-list { list-style: none; padding: 0; margin: 0; }
.leaderboard-list li {
    display: flex; justify-content: space-between; padding: 10px 0;
    border-bottom: 1px solid var(--border); font-size: 14px;
}
.rank-num { color: var(--text-muted); width: 28px; display: inline-block; }

.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 20px 0; color: var(--text-muted); font-size: 13px; }
