/* Servis tema katmanı — site.css ve account.css'ten SONRA yüklenir.
 * Her servis tek bir veri bloğudur (body[data-service]); bileşenler yalnızca bu değişkenleri okur.
 * Yeni servis eklemek: aşağıya bir blok + assets/cursor-<servis>.svg çifti eklemek yeterlidir.
 * --accent* @property ile kayıtlıdır: servis değişince renkler yumuşakça geçer, eski servisin rengi kalmaz. */
@property --accent   { syntax: "<color>"; inherits: true; initial-value: #10a37f; }
@property --accent-2 { syntax: "<color>"; inherits: true; initial-value: #34d399; }
@property --accent-3 { syntax: "<color>"; inherits: true; initial-value: #06b6d4; }

body {
  --accent: #10a37f; --accent-2: #34d399; --accent-3: #06b6d4; --on-accent: #fff;
  --svc-ok: #34d399; --svc-err: #f87171; --svc-glow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 18px 50px -18px color-mix(in srgb, var(--accent) 55%, transparent);
  --svc-tint: color-mix(in srgb, var(--accent) 13%, transparent);
  --cursor-c: var(--accent);
  --cur: url("cursor.svg") 4 2, auto; --cur-ptr: url("cursor-pointer.svg") 4 2, pointer;
  transition: --accent .55s ease, --accent-2 .55s ease, --accent-3 .55s ease, background-color .4s ease;
}
body[data-service="chatgpt"]    { --accent: #10a37f; --accent-2: #34d399; --accent-3: #06b6d4; --on-accent: #fff; --svc-ok: #34d399; --svc-err: #f87171;
  --cur: url("cursor-chatgpt.svg") 4 2, auto; --cur-ptr: url("cursor-pointer-chatgpt.svg") 4 2, pointer; }
body[data-service="claude"]     { --accent: #d97757; --accent-2: #f4a261; --accent-3: #e76f97; --on-accent: #fff; --svc-ok: #fbbf77; --svc-err: #fb7185;
  --cur: url("cursor-claude.svg") 4 2, auto; --cur-ptr: url("cursor-pointer-claude.svg") 4 2, pointer; }
body[data-service="perplexity"] { --accent: #20b8cd; --accent-2: #38bdf8; --accent-3: #6366f1; --on-accent: #04202a; --svc-ok: #5eead4; --svc-err: #fb923c;
  --cur: url("cursor-perplexity.svg") 4 2, auto; --cur-ptr: url("cursor-pointer-perplexity.svg") 4 2, pointer; }
body[data-service="grok"]       { --accent: #e2e8f0; --accent-2: #94a3b8; --accent-3: #f8fafc; --on-accent: #0b0f19; --svc-ok: #e2e8f0; --svc-err: #f43f5e;
  --cur: url("cursor-grok.svg") 4 2, auto; --cur-ptr: url("cursor-pointer-grok.svg") 4 2, pointer; }
body[data-service="telegram"]   { --accent: #229ed9; --accent-2: #2aabee; --accent-3: #67c9f0; --on-accent: #fff; --svc-ok: #7dd3fc; --svc-err: #f87171;
  --cur: url("cursor-telegram.svg") 4 2, auto; --cur-ptr: url("cursor-pointer-telegram.svg") 4 2, pointer; }
:root[data-theme="light"] body[data-service="grok"] { --accent: #1e293b; --accent-2: #475569; --accent-3: #0f172a; --on-accent: #fff; }

/* Köprü: account.css değişkenleri aktif servisten beslenir */
body { --svc: var(--accent); --svc-2: var(--accent-2); --svc-ink: var(--on-accent); }

/* Servise özel imleç şekli (renk halkası --cursor-c ile cursor.css'ten gelir) */
body { cursor: var(--cur); }
body a, body button, body summary, body label, body select, body [role="tab"], body [role="menuitem"], body [role="option"] { cursor: var(--cur-ptr); }

/* Arka plan tonu, kart yüzeyi, hover parlaması */
body { background-image: radial-gradient(1100px 560px at 8% -12%, var(--svc-tint), transparent 62%), radial-gradient(800px 480px at 100% 0, color-mix(in srgb, var(--accent-3) 9%, transparent), transparent 62%); }
.card, .panel { transition: border-color .3s ease, box-shadow .35s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.card:hover { border-color: color-mix(in srgb, var(--accent) 38%, transparent); box-shadow: var(--svc-glow); }
.stock-row:hover { box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--accent) 55%, transparent); }

/* Başlık vurgusu, buton durumları */
.hero h1 { text-shadow: 0 0 40px color-mix(in srgb, var(--accent) 25%, transparent); }
.btn-primary:focus-visible, .nav-btn:focus-visible, .icon-btn:focus-visible, .lang-btn:focus-visible, .nav-tab:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary:disabled, .btn:disabled { filter: saturate(.5); cursor: not-allowed; }
.btn:hover { box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--accent) 70%, transparent); }

/* İkon efekti: aktif servis sekmesi nabız atar, hover'da döner */
.nav-tab.active img { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); animation: svcIconPulse 2.6s ease-in-out infinite; }
@keyframes svcIconPulse { 0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); } }

/* Başarı / hata bildirimleri */
.error-msg { color: var(--svc-err); }
.error-msg:not(:empty) { background: color-mix(in srgb, var(--svc-err) 10%, transparent); border-color: color-mix(in srgb, var(--svc-err) 35%, transparent); animation: svcShake .4s ease; }
.alert-ok { color: var(--svc-ok); background: color-mix(in srgb, var(--svc-ok) 12%, transparent); border-color: color-mix(in srgb, var(--svc-ok) 40%, transparent); }
.alert-err { color: var(--svc-err); background: color-mix(in srgb, var(--svc-err) 12%, transparent); border-color: color-mix(in srgb, var(--svc-err) 40%, transparent); animation: svcShake .4s ease; }
@keyframes svcShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* Sayfa giriş / çıkış geçişi */
body { animation: svcPageIn .35s ease both; }
body.page-leave { opacity: 0; transition: opacity .17s ease; }
@keyframes svcPageIn { from { opacity: 0; } to { opacity: 1; } }

/* Yükleme animasyonu (formlar gönderilirken) */
form.is-loading .btn, form.is-loading .btn-primary { position: relative; pointer-events: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent); animation: spin .7s linear infinite; }

/* ============ Üst menü: giriş / kayıt / kullanıcı menüsü / hamburger ============ */
.nav-auth { display: flex; align-items: center; gap: 8px; }
.nav-login { color: var(--text); }
.nav-register { background: var(--grad, linear-gradient(135deg, var(--accent), var(--accent-2))); color: var(--on-accent); border-color: transparent; font-weight: 750; }
.nav-register:hover { color: var(--on-accent); transform: translateY(-1px); box-shadow: 0 12px 26px -12px var(--accent); }
.user-menu { position: relative; }
.user-btn { gap: 8px; padding: 0 12px 0 6px; }
.avatar { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--grad, var(--accent)); color: var(--on-accent); }
.user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px; border-radius: 14px; background: var(--surface-solid, #0f1523); border: 1px solid var(--border-strong, rgba(148,163,184,.24)); box-shadow: var(--shadow); display: grid; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.97); transform-origin: top right; transition: opacity .2s ease, transform .22s cubic-bezier(.2,.8,.2,1), visibility .2s; z-index: 70; }
.user-menu.open .user-pop { opacity: 1; visibility: visible; transform: none; }
.user-pop a, .user-pop button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; font-weight: 650; font-size: 13.5px; color: var(--text-2); background: none; border: 0; }
.user-pop a:hover, .user-pop button:hover, .user-pop a:focus-visible, .user-pop button:focus-visible { background: var(--soft, var(--svc-tint)); color: var(--text); outline: none; }
.user-pop .danger:hover { color: var(--svc-err); }
.nav-burger { display: none; }
.topbar .nav-auth { margin-left: auto; margin-right: 8px; }

@media (max-width: 820px) {
  .nav-burger { display: grid; }
  .navbar, .topbar { position: relative; }
  .nav-auth { display: none; position: absolute; left: 12px; right: 12px; top: calc(100% - 4px); z-index: 80; flex-direction: column; align-items: stretch; padding: 10px; border-radius: 16px;
    background: var(--surface-solid, #0f1523); border: 1px solid var(--border-strong, rgba(148,163,184,.24)); box-shadow: var(--shadow); margin: 0; }
  .menu-open .nav-auth { display: flex; animation: svcPageIn .22s ease both; }
  .nav-auth .nav-btn { width: 100%; justify-content: center; height: 46px; padding: 0 14px; }
  .nav-auth .nav-btn span { display: inline; }
  .user-pop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 4px 0 0; }
  .user-btn { pointer-events: none; }
  .navbar { z-index: 90; }
}
@media (prefers-reduced-motion: reduce) {
  body, .nav-tab.active img, .alert-err, .error-msg:not(:empty), .menu-open .nav-auth { animation: none !important; }
  body, .card, .panel, .user-pop { transition: none !important; }
  body.page-leave { transition: none; }
}

/* Masaüstünde dengeli yerleşim: dar masaüstünde Mağaza/Yardım yalnızca ikon olur, giriş/kayıt her zaman görünür kalır */
@media (min-width: 821px) and (max-width: 1440px) {
  .nav-store, #help-btn { width: 40px; padding: 0; justify-content: center; }
  .nav-store span, #help-btn span { display: none; }
  .nav-login, .nav-register { padding: 0 12px; }
}
/* Telefonda marka ile eylemler tek satırda kalsın: Mağaza kısayolu yüzen butonla zaten erişilebilir */
@media (max-width: 600px) { .nav-actions .nav-store { display: none; } .navbar .brand span small { display: none; } }
