/**
 * Feroad Online - Mobile Companion
 * Main Stylesheet
 */

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #151a3a;
    --bg-card: rgba(30, 35, 75, 0.4);
    --bg-card-hover: rgba(45, 55, 100, 0.5);
    --border: rgba(255, 255, 255, 0.08);
    --border-bright: rgba(255, 217, 102, 0.3);
    --text-primary: #e8e9ec;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent-gold: #ffd966;
    --accent-gold-dark: #d4a82a;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --accent-blue: #3b82f6;
    --accent-purple: #a855f7;
    --accent-orange: #f97316;
    --font-display: 'Cinzel', 'Georgia', serif;
    --font-body: 'Rajdhani', 'Segoe UI', sans-serif;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 24px rgba(255, 217, 102, 0.15);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body {
    background-image: 
        radial-gradient(ellipse at top, rgba(255, 217, 102, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
}

a:hover {
    color: var(--accent-gold-dark);
}

/* ═══════════════════════════════════════════════════════ */
/* TOP NAV BAR                                              */
/* ═══════════════════════════════════════════════════════ */

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(255, 217, 102, 0.3);
}

.app-logo .moon {
    display: inline-block;
    margin-right: 6px;
}

.header-action {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-action .user-chip {
    background: var(--bg-card);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--border);
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════ */
/* CONTENT LAYOUT                                           */
/* ═══════════════════════════════════════════════════════ */

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px 100px;
}

.section {
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-secondary);
    margin: 0 0 12px 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--accent-gold);
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════ */
/* CARDS                                                     */
/* ═══════════════════════════════════════════════════════ */

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--border-bright);
}

.character-card {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.character-card::after {
    content: '→';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-gold);
    font-size: 20px;
    transition: transform 0.3s;
}

.character-card:hover::after {
    transform: translateY(-50%) translateX(4px);
}

.character-avatar {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(255, 217, 102, 0.3);
}

.character-info {
    flex: 1;
    min-width: 0;
}

.character-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.character-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.level-badge {
    background: linear-gradient(135deg, rgba(255, 217, 102, 0.2), rgba(212, 168, 42, 0.2));
    border: 1px solid var(--border-bright);
    color: var(--accent-gold);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

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

.offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════ */
/* STAT GRID                                                 */
/* ═══════════════════════════════════════════════════════ */

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

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.gold { color: var(--accent-gold); }
.stat-value.green { color: var(--accent-green); }
.stat-value.red { color: var(--accent-red); }

/* ═══════════════════════════════════════════════════════ */
/* BOTTOM NAV                                                */
/* ═══════════════════════════════════════════════════════ */









/* ═══════════════════════════════════════════════════════ */
/* ALERTS                                                    */
/* ═══════════════════════════════════════════════════════ */

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(251, 146, 60, 0.1);
    border-color: rgba(251, 146, 60, 0.3);
    color: #fdba74;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* ═══════════════════════════════════════════════════════ */
/* LOGIN PAGE                                                */
/* ═══════════════════════════════════════════════════════ */

.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    max-width: 380px;
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 28px;
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--accent-gold);
    margin: 0 0 6px 0;
    text-shadow: 0 0 30px rgba(255, 217, 102, 0.4);
}

.login-logo p {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin: 0;
}

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

.form-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 15px;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 217, 102, 0.1);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #0a0e27;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 217, 102, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════ */
/* UTILITIES                                                 */
/* ═══════════════════════════════════════════════════════ */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--accent-gold); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 217, 102, 0.2);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile safe area adjustments */
@supports (padding: env(safe-area-inset-top)) {
    .app-header { padding-top: calc(14px + env(safe-area-inset-top)); }
}

/* ============================================ */
/* LOGO STILLERI (v1.3) */
/* ============================================ */

/* Header logo */
.app-logo-img {
    height: 28px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(255, 217, 102, 0.35));
    display: block;
}

/* Login ekranindaki logo */
.login-logo-img {
    display: block;
    width: 80%;
    max-width: 280px;
    height: auto;
    margin: 0 auto 12px;
    filter: drop-shadow(0 4px 20px rgba(255, 217, 102, 0.5));
}

/* CANLI badge animasyon */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}


/* ========================================= */
/*   MODERN BOTTOM NAV                       */
/* ========================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(10,14,39,0.92), rgba(10,14,39,0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,217,102,0.15);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 max(10px, env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    color: rgba(148, 163, 184, 0.7);
    text-decoration: none;
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: relative;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav .nav-svg {
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

.bottom-nav .nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    opacity: 0.75;
    transition: all 0.2s ease;
}

.bottom-nav .nav-item:active {
    transform: scale(0.92);
}

.bottom-nav .nav-item.active {
    color: #ffd966;
}

.bottom-nav .nav-item.active .nav-svg {
    filter: drop-shadow(0 0 8px rgba(255,217,102,0.6));
    transform: translateY(-2px);
}

.bottom-nav .nav-item.active .nav-label {
    opacity: 1;
    font-weight: 800;
}

.bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    right: 30%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd966, transparent);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 0 12px rgba(255,217,102,0.7);
}

/* Body'nin alt kismina bottom-nav kadar padding (icerik gizlenmesin) */
body {
    padding-bottom: 75px;
}

/* ========================================= */
/*   HEADER DUZELTME                         */
/* ========================================= */
.app-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(15,22,41,0.95), rgba(10,14,39,0.8));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 90;
}

.app-header .app-logo-img {
    max-height: 34px;
    max-width: 130px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-header .header-spacer {
    flex: 1;
}

.app-header .logout-btn,
.app-header .header-rank-btn {
    padding: 7px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 11px;
    text-decoration: none;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.app-header .logout-btn {
    background: rgba(239,68,68,0.12);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.3);
}

.app-header .header-rank-btn {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: white;
    box-shadow: 0 3px 10px rgba(168,85,247,0.3);
}


/* ========== NAV SVG ZORLA KUCUK ========== */
.bottom-nav .nav-item svg.nav-svg,
.bottom-nav svg.nav-svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    display: block;
    flex-shrink: 0;
}

.bottom-nav .nav-item {
    max-height: 58px;
    overflow: hidden;
}

/* Header ORTALAMA - SIRA butonu tam ortada OLMASIN, saga yaslansin */
.app-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    min-height: 54px;
}

.app-header .app-logo-img {
    max-height: 34px !important;
    max-width: 110px !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
    flex-shrink: 0;
}

.app-header .header-spacer {
    flex: 1 1 auto !important;
}

.app-header > a {
    flex-shrink: 0;
    white-space: nowrap;
}


/* Siralama butonu + icon */
.header-rank-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 7px 12px !important;
    background: linear-gradient(135deg, #a855f7, #6366f1) !important;
    color: white !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    letter-spacing: 1px !important;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(168,85,247,0.3) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.header-rank-btn svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
}

.header-rank-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(168,85,247,0.45) !important;
}


/* Ayar butonu - header'da */
.header-settings-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    background: rgba(255,255,255,0.06) !important;
    color: var(--text-muted) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s;
    flex-shrink: 0 !important;
}

.header-settings-btn:hover {
    background: rgba(255,255,255,0.1) !important;
    color: var(--accent-gold) !important;
    transform: rotate(45deg);
}

.header-settings-btn svg {
    width: 16px !important;
    height: 16px !important;
}
