/* Video Atölyesi: giriş / kayıt / hesap arayüzü (auth.js). Jetonlar tokens.css'ten gelir. Sınıf ön eki: au- */

/* ---- Üst bilgi: giriş düğmesi + hesap menüsü ---- */
.au-login {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; background: rgba(8, 12, 24, .5);
  color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.au-login:hover { color: #fff; border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .08); }

.au-acct { position: relative; }
.au-acct-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 42px; max-width: 220px; padding: 0 12px 0 6px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(8, 12, 24, .5);
  color: var(--ink); font-weight: 600; font-size: 14px;
  transition: border-color .2s ease, background .2s ease;
}
.au-acct-btn:hover, .au-acct-btn[aria-expanded="true"] { border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .08); }
.au-avatar {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 14px; text-transform: uppercase;
}
.au-acct-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-chev { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; transition: transform .2s ease; }
.au-acct-btn[aria-expanded="true"] .au-chev { transform: rotate(180deg); }

.au-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 120; width: 280px; max-width: calc(100vw - 2 * var(--gutter));
  padding: 8px; background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .75); animation: au-pop .16s ease both;
}
.au-menu-id { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.au-menu-label { display: block; font-size: 12px; color: var(--mute); letter-spacing: .02em; }
.au-menu-email { display: block; margin-top: 2px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; font-size: 14px; }
.au-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin-bottom: 6px; border-radius: 10px; background: rgba(124, 92, 255, .12); font-size: 14px; color: var(--ink-2); }
.au-menu-row b { font-family: var(--font-display); font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.au-menu-item {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink-2); font-weight: 600; font-size: 14px; text-align: left; transition: background .15s ease, color .15s ease;
}
.au-menu-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.au-menu-item.au-danger { color: var(--danger); }
.au-menu-item.au-danger:hover { background: rgba(255, 107, 122, .12); color: #ff9aa4; }

.vh-mobile .au-m-login {
  display: flex; align-items: center; width: 100%; min-height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: transparent;
  color: var(--ink-2); font-weight: 600; font-size: 17px; text-align: left; transition: background .2s ease, color .2s ease;
}
.vh-mobile .au-m-login:hover { background: rgba(255, 255, 255, .06); color: #fff; }

@media (max-width: 900px) {
  .au-login { padding: 0 16px; min-height: 40px; }
}
@media (max-width: 560px) {
  .au-acct-name, .au-acct-btn .au-chev { display: none; }
  .au-acct-btn { padding: 0 5px; min-height: 40px; max-width: none; }
  .au-menu { position: fixed; right: var(--gutter); left: var(--gutter); top: calc(var(--header-h) + 6px); width: auto; max-width: none; }
}
@media (max-width: 380px) {
  .au-login { padding: 0 12px; font-size: 13px; }
}

/* ---- Bildirim ---- */
.au-toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 400; transform: translateX(-50%); width: max-content; max-width: min(520px, calc(100vw - 32px));
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px 13px 18px; font-size: 14.5px; line-height: 1.5; color: var(--ink);
  background: var(--surface-solid); border: 1px solid var(--line-2); border-left: 4px solid var(--cyan); border-radius: var(--r-md);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .7); animation: au-pop .2s ease both;
}
.au-toast.is-error { border-left-color: var(--danger); }
.au-toast button { flex: none; width: 28px; height: 28px; margin-top: -2px; border: 0; border-radius: 8px; background: transparent; color: var(--mute); font-size: 18px; line-height: 1; }
.au-toast button:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---- Pencere ---- */
body.au-lock { overflow: hidden; }
.au-modal {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(3, 6, 14, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: au-fade .18s ease both;
}
.au-dialog {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 28px 28px 24px; background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  box-shadow: var(--shadow-glow); animation: au-pop .2s ease both; overscroll-behavior: contain;
}
.au-close {
  position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent;
  color: var(--mute); font-size: 22px; line-height: 1; transition: background .15s ease, color .15s ease;
}
.au-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.au-title { font-size: 24px; font-weight: 800; padding-right: 40px; }
.au-lede { margin-top: 8px; color: var(--mute); font-size: 14.5px; line-height: 1.55; }
.au-lede b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

.au-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 18px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.au-tab { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--mute); font-weight: 700; font-family: var(--font-display); font-size: 14.5px; transition: background .18s ease, color .18s ease; }
.au-tab:hover { color: #fff; }
.au-tab[aria-selected="true"] { background: var(--grad-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .45); }

.au-body { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.au-msg { margin-top: 14px; padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; background: rgba(255, 107, 122, .12); border: 1px solid rgba(255, 107, 122, .4); color: #ffc2c8; }
.au-msg.is-info { background: rgba(53, 224, 208, .1); border-color: rgba(53, 224, 208, .38); color: #bff5ef; }
.au-msg:empty { display: none; }

.au-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: 14px; background: rgba(255, 255, 255, .06); color: var(--ink); font-weight: 600; font-size: 15px;
  transition: background .18s ease, border-color .18s ease;
}
.au-google:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .3); }
.au-google svg { width: 20px; height: 20px; flex: none; }
.au-or { display: flex; align-items: center; gap: 14px; color: var(--mute); font-size: 13px; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.au-method { display: flex; gap: 8px; flex-wrap: wrap; }
.au-method button { flex: 1 1 auto; min-height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--mute); font-weight: 600; font-size: 13.5px; transition: all .18s ease; }
.au-method button:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.au-method button[aria-pressed="true"] { color: #fff; background: rgba(124, 92, 255, .22); border-color: rgba(167, 139, 250, .65); }

.au-form { display: flex; flex-direction: column; gap: 14px; }
.au-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.au-field > label, .au-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.au-input {
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 16px; font: 400 16px/1.4 var(--font-ui); color: var(--ink);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.au-input::placeholder { color: #7E89A3; opacity: 1; }
.au-input:hover { border-color: rgba(167, 139, 250, .55); }
.au-input:focus { outline: none; border-color: #A78BFA; background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 3px rgba(129, 105, 250, .38); }
.au-input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.au-input[aria-invalid="true"] { border-color: var(--danger); }
.au-pw { position: relative; }
.au-pw .au-input { padding-right: 84px; }
.au-pw-toggle { position: absolute; right: 6px; top: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.au-pw-toggle:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.au-code { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: .5em; padding-left: calc(16px + .5em); min-height: 60px; font-variant-numeric: tabular-nums; }
.au-code::placeholder { letter-spacing: .5em; color: #4F5A74; }

.au-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; color: var(--mute); }
.au-rules li { display: flex; align-items: center; gap: 8px; transition: color .15s ease; }
.au-rules li::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .7; }
.au-rules li[data-ok="1"] { color: #7CF0C5; }
.au-rules li[data-ok="1"]::before { opacity: 1; background: #7CF0C5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.3l2.3 2.3 4.7-4.9' fill='none' stroke='%23062' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; border-color: #7CF0C5; }

.au-check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.au-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #8B6BFF; cursor: pointer; }
.au-check a, .au-note a, .au-lede a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.au-check a:hover, .au-note a:hover, .au-lede a:hover { color: #fff; }
.au-note { font-size: 13px; color: var(--mute); line-height: 1.55; }

.au-submit {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 0 22px; border: 0; border-radius: 14px;
  background: var(--grad); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 16px;
  box-shadow: 0 10px 30px -8px rgba(255, 92, 138, .55), inset 0 1px 0 rgba(255, 255, 255, .28); transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.au-submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.au-submit:disabled { opacity: .55; cursor: not-allowed; }
.au-submit[aria-busy="true"] { cursor: progress; }
.au-submit.au-danger { background: linear-gradient(90deg, #E5484D, #FF6B7A); box-shadow: 0 10px 30px -8px rgba(229, 72, 77, .5), inset 0 1px 0 rgba(255, 255, 255, .25); }

.au-links { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.au-link { padding: 8px 2px; border: 0; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .3); }
.au-link:hover:not(:disabled) { color: #fff; }
.au-link:disabled { opacity: .6; cursor: default; text-decoration: none; }

.au-ts { min-height: 0; display: flex; justify-content: center; }
.au-ts:empty { display: none; }

.au-warn { padding: 12px 14px; border-radius: 12px; background: rgba(255, 193, 94, .1); border: 1px solid rgba(255, 193, 94, .4); color: #ffe2ad; font-size: 14px; line-height: 1.55; }
.au-warn ul { margin-top: 6px; padding-left: 18px; list-style: disc; }

@keyframes au-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes au-pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .au-modal { align-items: flex-end; padding: 0; }
  .au-dialog { max-width: none; max-height: 94vh; max-height: 94dvh; padding: 24px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; border-bottom: 0; animation-name: au-sheet; }
  .au-title { font-size: 22px; }
  .au-code { font-size: 26px; letter-spacing: .4em; padding-left: calc(16px + .4em); }
  .au-rules { grid-template-columns: 1fr 1fr; }
  .au-toast { bottom: 12px; }
}
@keyframes au-sheet { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .au-modal, .au-dialog, .au-menu, .au-toast { animation: none !important; }
}
