/* ============================================================
   Site Temaları — data-site-theme ile geçiş yapılır
   default.css'teki değişkenleri ezerek tüm siteyi renklendirir.
   Yeni tema eklemek için: yeni bir html[data-site-theme="ad"]
   bloğu ekleyin ve admin select'ine seçeneği tanımlayın.
   ============================================================ */

/* Yumuşak zemin geçişi (yalnızca kök öğeler; mevcut buton/efekt
   transition'larını ezmemek için dar tutuldu) */
html, body {
    transition: background-color .35s ease, color .25s ease;
}

/* İkincil accent değişkenlerini temanın ikincil rengine bağla.
   Bazı pop-up/modal buton gradyanları (örn. number-guess) eskiden
   sabit mor (--theme-accent-color #a855f7) ile bitiyordu; böylece
   tüm gradyanlar seçilen temaya uyumlu hale gelir. (default hariç) */
html[data-site-theme="gold"],
html[data-site-theme="emerald"],
html[data-site-theme="purple"],
html[data-site-theme="crimson"],
html[data-site-theme="midnight"],
html[data-site-theme="light"],
html[data-site-theme="custom"] {
    --theme-accent-color: var(--secondary-color);
    --theme-accent-rgb: var(--primary-rgb);
    --theme-purple: var(--secondary-color);
    --theme-purple-rgb: var(--primary-rgb);
    --button-surface-end: var(--secondary-color);
    --daily-reward-action-hover-end: var(--secondary-color);
}

/* ---------- Ortak vurgu (accent) ezme şablonu ----------
   Her renk teması aşağıdaki değişkenleri kendi tonlarıyla
   yeniden tanımlar. Arka plan koyu kalır (default.css). */

/* ===== ALTIN (gold) ===== */
html[data-site-theme="gold"] {
    --primary-color: #E7C45A;
    --secondary-color: #C9A23A;
    --primary-rgb: 231, 196, 90;
    --primary-color-strong: rgba(231, 196, 90, 1);

    --star-onemli-text-color: #E7C45A;
    --star-button-background-color: #E7C45A;
    --star-button-hover-background-color: #C9A23A;
    --star-bonus-card-image-color: linear-gradient(to right, rgba(231,196,90,.18), rgba(231,196,90,0));
    --nirvana-onemli-text-color: #E7C45A;
    --nirvana-button-background-color: #E7C45A;
    --nirvana-button-hover-background-color: #C9A23A;
    --nirvana-bonus-card-image-color: linear-gradient(to right, rgba(231,196,90,.18), rgba(231,196,90,0));

    --theme-orange: #E7C45A; --theme-orange-rgb: 231, 196, 90; --theme-orange-dark: #C9A23A;
    --theme-deep-orange: #D4A838; --theme-deep-orange-rgb: 212, 168, 56; --theme-deep-orange-dark: #A9760A;

    --profile-placeholder-start: #F7DD8E; --profile-placeholder-end: #C9A23A;
    --profile-placeholder-start-rgb: 247, 221, 142; --profile-placeholder-end-rgb: 201, 162, 58;

    --sponsor-accent-color: #E7C45A;
    --button-surface-start: #E7C45A; --button-surface-end: #C9A23A;
    --daily-reward-secondary-hover: #C9A23A; --daily-reward-action-hover-end: #F7DD8E;
}

/* ===== ZÜMRÜT (emerald) ===== */
html[data-site-theme="emerald"] {
    --primary-color: #10D9A0;
    --secondary-color: #0FAE80;
    --primary-rgb: 16, 217, 160;
    --primary-color-strong: rgba(16, 217, 160, 1);

    --star-onemli-text-color: #10D9A0;
    --star-button-background-color: #10D9A0;
    --star-button-hover-background-color: #0FAE80;
    --star-bonus-card-image-color: linear-gradient(to right, rgba(16,217,160,.18), rgba(16,217,160,0));
    --nirvana-onemli-text-color: #10D9A0;
    --nirvana-button-background-color: #10D9A0;
    --nirvana-button-hover-background-color: #0FAE80;
    --nirvana-bonus-card-image-color: linear-gradient(to right, rgba(16,217,160,.18), rgba(16,217,160,0));

    --theme-orange: #10D9A0; --theme-orange-rgb: 16, 217, 160; --theme-orange-dark: #0FAE80;
    --theme-deep-orange: #0FAE80; --theme-deep-orange-rgb: 15, 174, 128; --theme-deep-orange-dark: #0C8A66;

    --profile-placeholder-start: #34F0BE; --profile-placeholder-end: #0FAE80;
    --profile-placeholder-start-rgb: 52, 240, 190; --profile-placeholder-end-rgb: 15, 174, 128;

    --sponsor-accent-color: #10D9A0;
    --button-surface-start: #10D9A0; --button-surface-end: #0FAE80;
    --daily-reward-secondary-hover: #0FAE80; --daily-reward-action-hover-end: #34F0BE;
}

/* ===== NEON MOR (purple) ===== */
html[data-site-theme="purple"] {
    --primary-color: #A855F7;
    --secondary-color: #8B3EE0;
    --primary-rgb: 168, 85, 247;
    --primary-color-strong: rgba(168, 85, 247, 1);

    --star-onemli-text-color: #A855F7;
    --star-button-background-color: #A855F7;
    --star-button-hover-background-color: #8B3EE0;
    --star-bonus-card-image-color: linear-gradient(to right, rgba(168,85,247,.20), rgba(168,85,247,0));
    --nirvana-onemli-text-color: #A855F7;
    --nirvana-button-background-color: #A855F7;
    --nirvana-button-hover-background-color: #8B3EE0;
    --nirvana-bonus-card-image-color: linear-gradient(to right, rgba(168,85,247,.20), rgba(168,85,247,0));

    --theme-orange: #A855F7; --theme-orange-rgb: 168, 85, 247; --theme-orange-dark: #8B3EE0;
    --theme-deep-orange: #8B3EE0; --theme-deep-orange-rgb: 139, 62, 224; --theme-deep-orange-dark: #6D28B5;

    --profile-placeholder-start: #C084FC; --profile-placeholder-end: #8B3EE0;
    --profile-placeholder-start-rgb: 192, 132, 252; --profile-placeholder-end-rgb: 139, 62, 224;

    --sponsor-accent-color: #A855F7;
    --button-surface-start: #A855F7; --button-surface-end: #6366F1;
    --daily-reward-secondary-hover: #8B3EE0; --daily-reward-action-hover-end: #C084FC;
}

/* ===== ATEŞ KIRMIZISI (crimson) ===== */
html[data-site-theme="crimson"] {
    --primary-color: #FF4D5E;
    --secondary-color: #E0344A;
    --primary-rgb: 255, 77, 94;
    --primary-color-strong: rgba(255, 77, 94, 1);

    --star-onemli-text-color: #FF4D5E;
    --star-button-background-color: #FF4D5E;
    --star-button-hover-background-color: #E0344A;
    --star-bonus-card-image-color: linear-gradient(to right, rgba(255,77,94,.18), rgba(255,77,94,0));
    --nirvana-onemli-text-color: #FF4D5E;
    --nirvana-button-background-color: #FF4D5E;
    --nirvana-button-hover-background-color: #E0344A;
    --nirvana-bonus-card-image-color: linear-gradient(to right, rgba(255,77,94,.18), rgba(255,77,94,0));

    --theme-orange: #FF4D5E; --theme-orange-rgb: 255, 77, 94; --theme-orange-dark: #E0344A;
    --theme-deep-orange: #E0344A; --theme-deep-orange-rgb: 224, 52, 74; --theme-deep-orange-dark: #B82238;

    --profile-placeholder-start: #FF7A86; --profile-placeholder-end: #E0344A;
    --profile-placeholder-start-rgb: 255, 122, 134; --profile-placeholder-end-rgb: 224, 52, 74;

    --sponsor-accent-color: #FF4D5E;
    --button-surface-start: #FF4D5E; --button-surface-end: #FF8A3D;
    --daily-reward-secondary-hover: #E0344A; --daily-reward-action-hover-end: #FF7A86;
}

/* ===== GECE MAVİSİ (midnight) — koyu lacivert zemin + mavi vurgu ===== */
html[data-site-theme="midnight"] {
    --primary-color: #3B82F6;
    --secondary-color: #2563EB;
    --primary-rgb: 59, 130, 246;
    --primary-color-strong: rgba(59, 130, 246, 1);

    --star-onemli-text-color: #60A5FA;
    --star-button-background-color: #3B82F6;
    --star-button-hover-background-color: #2563EB;
    --nirvana-onemli-text-color: #60A5FA;
    --nirvana-button-background-color: #3B82F6;
    --nirvana-button-hover-background-color: #2563EB;

    --theme-orange: #3B82F6; --theme-orange-rgb: 59, 130, 246; --theme-orange-dark: #2563EB;
    --theme-deep-orange: #2563EB; --theme-deep-orange-rgb: 37, 99, 235; --theme-deep-orange-dark: #1D4ED8;

    --profile-placeholder-start: #60A5FA; --profile-placeholder-end: #2563EB;
    --sponsor-accent-color: #3B82F6;
    --button-surface-start: #3B82F6; --button-surface-end: #6366F1;

    /* Zemin: lacivert tonlar */
    --dark-bg: #0a1124;
    --nirvana-card-background-color: #0e1730;
    --nirvana-navbar-bg: rgba(8, 14, 33, 0.95);
    --star-navbar-bg: rgba(8, 14, 33, 0.95);
    --nirvana-sidebar-button-background-color: #131e3d;
    --star-sidebar-button-background-color: #131e3d;
    --nirvana-card-background-color: #0e1730;
    --star-card-background-color: #0e1730;
    --nirvana-bonus-card-background-color: #0e1730;
    --star-bonus-card-background-color: #0e1730;
    --theme-surface-1: #131e3d;
    --theme-surface-2: #0e1730;
    --card-default: #0e1730;
    --card-border: #1e2c52;
    --sponsor-card-bg: #0e1730;
    --sponsor-card-border: #1e2c52;
    --sponsor-bonus-bg: #0e1730;
    --sponsor-bonus-border: #1e2c52;
    --chat-modal-bg: #0e1730;
    --chat-message-bg: #131e3d;
    --nirvana-border-color: rgba(30, 44, 82, 0.6);
    --star-border-color: rgba(30, 44, 82, 0.6);
}

/* ===== AÇIK (light) ===== */
html[data-site-theme="light"] {
    --primary-color: #2563EB;
    --secondary-color: #1D4ED8;
    --primary-rgb: 37, 99, 235;
    --primary-color-strong: rgba(37, 99, 235, 1);

    --star-onemli-text-color: #2563EB;
    --star-button-background-color: #2563EB;
    --star-button-hover-background-color: #1D4ED8;
    --star-button-text-color: #ffffff;
    --nirvana-onemli-text-color: #2563EB;
    --nirvana-button-background-color: #2563EB;
    --nirvana-button-hover-background-color: #1D4ED8;
    --nirvana-button-text-color: #ffffff;

    --theme-orange: #2563EB; --theme-orange-rgb: 37, 99, 235; --theme-orange-dark: #1D4ED8;
    --theme-deep-orange: #1D4ED8; --theme-deep-orange-rgb: 29, 78, 216; --theme-deep-orange-dark: #1E40AF;

    --profile-placeholder-start: #3B82F6; --profile-placeholder-end: #1D4ED8;
    --sponsor-accent-color: #2563EB;
    --button-surface-start: #2563EB; --button-surface-end: #6366F1;

    /* Açık zemin + koyu metin */
    --dark-bg: #eef1f6;
    --nirvana-card-background-color: #ffffff;
    --star-navbar-bg: rgba(255, 255, 255, 0.95);
    --nirvana-navbar-bg: rgba(255, 255, 255, 0.95);
    --nirvana-normal-text-color: #16202e;
    --star-normal-text-color: #16202e;
    --nirvana-onemsiz-text-color: #64748b;
    --star-onemsiz-text-color: #64748b;
    --nirvana-sidebar-button-background-color: #f1f4f9;
    --star-sidebar-button-background-color: #f1f4f9;
    --nirvana-card-background-color: #ffffff;
    --star-card-background-color: #ffffff;
    --nirvana-bonus-card-background-color: #ffffff;
    --star-bonus-card-background-color: #ffffff;
    --theme-surface-1: #ffffff;
    --theme-surface-2: #f4f6fb;
    --card-default: #ffffff;
    --card-border: #e2e8f0;
    --sponsor-card-bg: #ffffff;
    --sponsor-card-border: #e2e8f0;
    --sponsor-bonus-bg: #ffffff;
    --sponsor-bonus-border: #e2e8f0;
    --sponsor-muted-color: #64748b;
    --chat-modal-bg: #ffffff;
    --chat-message-bg: #f1f4f9;
    --section-title-color: #16202e;
    --nirvana-box-shadow-color: rgba(15, 23, 42, 0.12);
    --star-box-shadow-color: rgba(15, 23, 42, 0.12);
    --nirvana-border-color: rgba(226, 232, 240, 0.9);
    --star-border-color: rgba(226, 232, 240, 0.9);
    --social-button-bg: rgba(15, 23, 42, 0.05);
    --overlay-dark-90-card: rgba(255, 255, 255, 0.92);
    --overlay-sidebar-90: rgba(255, 255, 255, 0.92);
}
html[data-site-theme="light"] body { color: #16202e; }
html[data-site-theme="light"] { color-scheme: light; }
