/* ==========================================================================
   Knight Online World - 2007 Nostalgia & Modern Cyber-Gothic Design System
   Cloudflare Pages / Workers Web Panel
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
    /* Theme Palettes */
    --bg-dark: #07090e;
    --bg-surface: #0e121b;
    --bg-card: rgba(18, 24, 38, 0.85);
    --bg-card-hover: rgba(26, 34, 52, 0.95);
    
    /* KO Brand & Faction Colors */
    --gold-primary: #dfb15b;
    --gold-light: #f7d88b;
    --gold-dark: #8c6721;
    --gold-glow: rgba(223, 177, 91, 0.4);
    
    --elmorad-red: #d32f2f;
    --elmorad-glow: rgba(211, 47, 47, 0.5);
    --karus-blue: #1976d2;
    --karus-glow: rgba(25, 118, 210, 0.5);
    
    --shield-green: #00e676;
    --shield-glow: rgba(0, 230, 118, 0.4);
    --danger-red: #ff1744;
    
    /* Text colors */
    --text-primary: #f0f3f8;
    --text-secondary: #9da8be;
    --text-muted: #616e85;
    
    /* Borders */
    --border-gold: 1px solid rgba(223, 177, 91, 0.35);
    --border-subtle: 1px solid rgba(255, 255, 255, 0.08);
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(223, 177, 91, 0.08), transparent 45%),
        radial-gradient(circle at 10% 30%, rgba(25, 118, 210, 0.06), transparent 40%),
        radial-gradient(circle at 90% 30%, rgba(211, 47, 47, 0.06), transparent 40%),
        linear-gradient(to bottom, #07090e 0%, #0a0d14 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header-top-bar {
    background: rgba(8, 10, 15, 0.95);
    border-bottom: 1px solid rgba(223, 177, 91, 0.2);
    font-size: 0.85rem;
    padding: 6px 0;
    position: relative;
    z-index: 100;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.server-indicators {
    display: flex;
    gap: 20px;
    align-items: center;
}

.indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--shield-green);
    box-shadow: 0 0 8px var(--shield-green);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(0.95); box-shadow: 0 0 4px var(--shield-green); }
    50% { transform: scale(1.15); box-shadow: 0 0 12px var(--shield-green); }
    100% { transform: scale(0.95); box-shadow: 0 0 4px var(--shield-green); }
}

.navbar {
    background: rgba(14, 18, 27, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--gold-dark);
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 76px;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px var(--gold-glow);
}

.logo-icon span {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: #1a1405;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, var(--gold-light), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.logo-text p {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--gold-primary);
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.25s ease;
    position: relative;
    padding: 8px 0;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--gold-light);
    text-shadow: 0 0 10px var(--gold-glow);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gold-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ==========================================================================
   Buttons & CTAs
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gold {
    background: linear-gradient(180deg, #dfb15b 0%, #aa7b25 100%);
    color: #171104;
    border: 1px solid #ffd88a;
    box-shadow: 0 4px 15px rgba(223, 177, 91, 0.3);
}

.btn-gold:hover {
    background: linear-gradient(180deg, #ffd88a 0%, #c49232 100%);
    box-shadow: 0 0 25px rgba(223, 177, 91, 0.6);
    transform: translateY(-2px);
    color: #000;
}

.btn-outline-gold {
    background: rgba(223, 177, 91, 0.05);
    color: var(--gold-light);
    border: 1px solid var(--gold-primary);
}

.btn-outline-gold:hover {
    background: rgba(223, 177, 91, 0.15);
    box-shadow: 0 0 18px var(--gold-glow);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(180deg, #e53935 0%, #b71c1c 100%);
    color: #fff;
    border: 1px solid #ff7961;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.btn-danger:hover {
    box-shadow: 0 0 25px rgba(229, 57, 53, 0.7);
    transform: translateY(-2px);
}

/* ==========================================================================
   Hero Banner Section
   ========================================================================== */
.hero-banner {
    padding: 80px 0 60px 0;
    position: relative;
    text-align: center;
}

.hero-content {
    max-width: 860px;
    margin: 0 auto;
}

.badge-v1950 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(223, 177, 91, 0.1);
    border: 1px solid var(--gold-primary);
    color: var(--gold-light);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 24px;
    box-shadow: 0 0 15px var(--gold-glow);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 18px;
    background: linear-gradient(180deg, #ffffff 20%, #e2c076 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-weight: 400;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 40px;
}

/* ==========================================================================
   Server Stats Card Row
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.stat-card {
    background: var(--bg-card);
    border: var(--border-gold);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.stat-card:hover {
    border-color: var(--gold-light);
    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-4px);
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.stat-card .stat-val {
    font-family: var(--font-mono);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Section Title Styles
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 10px;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
}

.section-divider .line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.section-divider .gem {
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    background: var(--gold-light);
    box-shadow: 0 0 8px var(--gold-glow);
}

/* ==========================================================================
   UPGRADE RATES TABLE (Nostalji & Seffaf)
   ========================================================================== */
.upgrade-section {
    padding: 60px 0;
}

.upgrade-table-container {
    background: var(--bg-card);
    border: var(--border-gold);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.upgrade-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.upgrade-table th {
    background: rgba(14, 18, 27, 0.95);
    padding: 16px 20px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    color: var(--gold-light);
    border-bottom: 2px solid var(--gold-dark);
    text-transform: uppercase;
}

.upgrade-table td {
    padding: 14px 20px;
    font-family: var(--font-mono);
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.upgrade-table tr:hover td {
    background: rgba(223, 177, 91, 0.04);
}

.rate-badge {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.rate-100 { background: rgba(0, 230, 118, 0.15); color: #00e676; border: 1px solid rgba(0, 230, 118, 0.4); }
.rate-high { background: rgba(33, 150, 243, 0.15); color: #2196f3; border: 1px solid rgba(33, 150, 243, 0.4); }
.rate-med { background: rgba(255, 193, 7, 0.15); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.4); }
.rate-low { background: rgba(244, 67, 54, 0.15); color: #f44336; border: 1px solid rgba(244, 67, 54, 0.4); }

/* ==========================================================================
   ANTI-CHEAT & SECURITY SECTION (Hilecileri Korkutan Kalkan)
   ========================================================================== */
.security-section {
    padding: 60px 0;
    position: relative;
}

.security-box {
    background: linear-gradient(135deg, rgba(14, 18, 27, 0.95) 0%, rgba(20, 10, 10, 0.9) 100%);
    border: 2px solid var(--danger-red);
    box-shadow: 0 0 35px rgba(255, 23, 68, 0.25);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.security-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff1744, #ff9100, #ff1744);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.sec-feature {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 23, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 22px;
    transition: all 0.3s;
}

.sec-feature:hover {
    border-color: var(--danger-red);
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.4);
    transform: translateY(-3px);
}

.sec-feature h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #ff5252;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sec-feature p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sec-warning-banner {
    margin-top: 35px;
    background: rgba(255, 23, 68, 0.12);
    border-left: 4px solid var(--danger-red);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sec-warning-banner span {
    font-family: var(--font-mono);
    color: #ff8a80;
    font-size: 0.95rem;
}

/* ==========================================================================
   MODAL DIALOGS (Login / Register)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-card {
    background: var(--bg-surface);
    border: var(--border-gold);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 30px var(--gold-glow);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 35px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--gold-light);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--gold-light);
    text-align: center;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-family: var(--font-heading);
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(223, 177, 91, 0.3);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: 0 0 12px var(--gold-glow);
    background: rgba(0, 0, 0, 0.7);
}

.form-helper {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.modal-footer-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 20px;
}

.modal-footer-text a {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 600;
}

.modal-footer-text a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   DASHBOARD LAYOUT (Kullanıcı Paneli)
   ========================================================================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    padding: 40px 0;
}

.sidebar-panel {
    background: var(--bg-card);
    border: var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: fit-content;
}

.user-profile-badge {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), #10141f);
    border: 2px solid var(--gold-primary);
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 0 15px var(--gold-glow);
}

.user-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--gold-light);
}

.user-kc-pill {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(223, 177, 91, 0.15);
    border: 1px solid var(--gold-primary);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--gold-light);
    margin-top: 8px;
}

.dashboard-nav {
    list-style: none;
}

.dashboard-nav li {
    margin-bottom: 8px;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.dashboard-nav a:hover, .dashboard-nav a.active {
    background: rgba(223, 177, 91, 0.12);
    color: var(--gold-light);
    border-left: 3px solid var(--gold-primary);
}

.dashboard-card {
    background: var(--bg-card);
    border: var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.dashboard-card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--gold-light);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.character-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.character-card:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px rgba(223, 177, 91, 0.2);
}

.char-info h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #fff;
}

.char-details {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface);
    border-left: 4px solid var(--gold-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.9rem;
    min-width: 280px;
    animation: slideIn 0.3s ease;
}

.toast.success { border-left-color: var(--shield-green); }
.toast.error { border-left-color: var(--danger-red); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #05070a;
    border-top: 1px solid rgba(223, 177, 91, 0.2);
    padding: 40px 0 20px 0;
    margin-top: 60px;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .security-grid { grid-template-columns: 1fr; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .character-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.5rem; }
}
