/* ============================================
   BiteFight - Modern Edition
   Gotik / vampir / koyu tema
   ============================================ */

:root {
    --bg-darkest: #0a0a0d;
    --bg-dark: #14121a;
    --bg-card: #1c1922;
    --bg-elevated: #262030;
    --border: #3a2f4a;
    --border-bright: #5a3a7a;
    --text: #e0d8ee;
    --text-dim: #9a8fb0;
    --text-muted: #6b5e80;
    --accent: #b91c2c;          /* kan kırmızısı */
    --accent-hover: #d92d3f;
    --accent-dim: #7a1521;
    --gold: #c9a14a;
    --gold-bright: #e8c062;
    --hellstone: #ff4444;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #ef4444;
    --info: #60a5fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg-darkest);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

body {
    background-image:
        radial-gradient(ellipse at top, rgba(185, 28, 44, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(90, 58, 122, 0.08) 0%, transparent 50%);
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
    font-family: 'Cinzel', 'Times New Roman', serif;
    color: var(--text);
    margin-bottom: 0.6em;
    letter-spacing: 0.02em;
}
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; color: var(--accent); }
h3 { font-size: 1.15rem; }

/* === Layout === */
.layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }
}

.header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.header .logo {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(185,28,44,0.4);
    letter-spacing: 0.05em;
}

.header-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.header-info b { color: var(--gold); }
.header-info .hp { color: var(--accent); }

.lang-switcher {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}
.lang-switcher a {
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
}
.lang-switcher a:hover { border-color: var(--accent); color: var(--accent); }
.lang-switcher a.active { background: var(--accent); color: white; border-color: var(--accent); }

/* === Menu === */
.menu {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    height: fit-content;
}

.menu h3 {
    background: var(--bg-elevated);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin: 0;
    border-bottom: 1px solid var(--border);
}

.menu ul { list-style: none; }
.menu li a {
    display: block;
    padding: 0.65rem 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--bg-dark);
    transition: all 0.15s;
    font-size: 0.92rem;
}
.menu li a:hover {
    background: var(--bg-elevated);
    color: var(--accent-hover);
    padding-left: 1.5rem;
}
.menu li a.active { background: var(--accent-dim); color: white; }
.menu li a.admin-link { color: var(--gold); }

/* === Content === */
.content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* === Cards === */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.stat-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    text-align: center;
}

.stat-box .label {
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.stat-box .value {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent);
}

.stat-box.gold .value { color: var(--gold); }
.stat-box.hp .value { color: var(--success); }

/* === Forms === */
form { display: block; }

.form-row {
    margin-bottom: 1rem;
}

label {
    display: block;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"], input[type="password"], input[type="email"],
input[type="number"], select, textarea {
    width: 100%;
    background: var(--bg-darkest);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(185,28,44,0.15);
}

input[type="checkbox"], input[type="radio"] {
    accent-color: var(--accent);
    margin-right: 0.4rem;
}

button, .btn, input[type="submit"] {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: white;
    border: 1px solid var(--accent);
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.15s;
    text-decoration: none;
}

button:hover, .btn:hover, input[type="submit"]:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 0 12px rgba(185,28,44,0.4);
}

.btn-secondary {
    background: var(--bg-elevated);
    border-color: var(--border-bright);
    color: var(--text);
}
.btn-secondary:hover { background: var(--border); }

.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: var(--success); border-color: var(--success); color: var(--bg-darkest); }

.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }

/* === Tables === */
.tbl {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.tbl th, .tbl td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.tbl th {
    background: var(--bg-elevated);
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tbl tr:hover td { background: var(--bg-elevated); }

/* === Flash messages === */
.flash {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 3px;
    border-left: 3px solid;
    font-size: 0.9rem;
}
.flash-success { background: rgba(74,222,128,0.1); border-color: var(--success); color: var(--success); }
.flash-error { background: rgba(239,68,68,0.1); border-color: var(--danger); color: var(--danger); }
.flash-warning { background: rgba(251,191,36,0.1); border-color: var(--warning); color: var(--warning); }
.flash-info { background: rgba(96,165,250,0.1); border-color: var(--info); color: var(--info); }

/* === Race choice === */
.race-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}
@media (max-width: 600px) { .race-grid { grid-template-columns: 1fr; } }

.race-card {
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}
.race-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(185,28,44,0.25);
}
.race-card h3 { color: var(--accent); margin-top: 1rem; }
.race-card p { color: var(--text-dim); font-size: 0.9rem; }

/* === Item / Shop === */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.item-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    transition: all 0.15s;
}
.item-card:hover { border-color: var(--accent); }
.item-card .item-name { font-weight: bold; color: var(--accent); margin-bottom: 0.3rem; }
.item-card .item-stats { font-size: 0.8rem; color: var(--text-dim); margin: 0.3rem 0; }
.item-card .item-bonus { color: var(--success); }
.item-card .item-cost { color: var(--gold); font-weight: bold; margin-top: 0.5rem; }
.item-card.equipped { border-color: var(--gold); background: rgba(201,161,74,0.05); }

/* === Center page === */
.auth-page {
    max-width: 480px;
    margin: 4rem auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.auth-page h1 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tabs a {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: var(--bg-elevated);
    color: var(--text-dim);
    border-radius: 3px;
    text-decoration: none;
}
.tabs a.active { background: var(--accent); color: white; }

/* === Admin === */
.admin-layout { grid-template-columns: 200px 1fr; }
.admin-menu li a { font-size: 0.85rem; }
.admin-menu li a:before { content: '› '; opacity: 0.6; }
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.badge-admin { background: var(--gold); color: var(--bg-darkest); }
.badge-banned { background: var(--danger); color: white; }
.badge-vampire { background: var(--accent-dim); color: white; }
.badge-werewolf { background: #4a3018; color: var(--gold-bright); }

/* === Helpers === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-gold { color: var(--gold); }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.mt-2 { margin-top: 2rem; }
.flex { display: flex; gap: 1rem; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-half { gap: 0.5rem; }
hr.divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* ============================================
   ORIJINAL GORSEL ENTEGRASYONU
   ============================================ */

/* Site banner (home_head.jpg) */
.site-banner {
    max-width: 1200px;
    margin: 1rem auto 0;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}
.site-banner-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Index sayfasi hero */
.home-hero {
    text-align: center;
    margin: 1rem 0 2rem;
}
.home-splash {
    max-width: 100%;
    height: auto;
    border: 2px solid var(--border-bright);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(185, 28, 44, 0.3);
}
.home-hero-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}
@media (max-width: 768px) {
    .home-hero-thumbs { grid-template-columns: 1fr; }
}
.home-thumb {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem;
    text-align: center;
}
.home-thumb img {
    width: 170px;
    height: 86px;
    object-fit: cover;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}
.home-thumb p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.home-cta {
    text-align: center;
    margin: 2rem 0;
}
.home-cta h1 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
}
.home-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Race card icindeki gorsel */
.race-card img {
    max-width: 170px;
    height: auto;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

/* Karakter sayfasi - irk portresi */
.character-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.character-portrait {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border: 2px solid var(--border-bright);
    border-radius: 6px;
    background: var(--bg-darkest);
    padding: 4px;
}
.character-info { flex: 1; }
@media (max-width: 600px) {
    .character-header { flex-direction: column; text-align: center; }
}

/* Item resmi (orijinal item/{id}.jpg) */
.item-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
    margin: 0 auto 0.5rem;
    background: var(--bg-darkest);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 4px;
}

/* Menu ikonlari */
.menu-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 0.4rem;
    filter: brightness(0.9);
}

/* Register sayfasi irk onizleme */
.race-preview {
    width: 170px;
    height: 170px;
    object-fit: contain;
    border: 2px solid var(--border-bright);
    border-radius: 6px;
    background: var(--bg-darkest);
    padding: 8px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
