/* Ortak yeni bileşenler: toast, formlar, kimlik doğrulama, profil seçimi, canlı TV, planlar */
:root { --muted: #8c8c8c; --line: #2b2b2b; --ok: #46d369; --warn: #e87c03; --bad: #e50914; }

*, *::before, *::after { box-sizing: border-box; }
a { color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
button { font-family: inherit; }

#aw-toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: #222; color: #fff; padding: 12px 22px; border-radius: 8px; border: 1px solid #444;
  z-index: 5000; opacity: 0; pointer-events: none; transition: .25s; max-width: 90vw; font-size: .95rem;
}
#aw-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Giriş / kayıt / karşılama ---- */
.auth-bg {
  min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 24px 16px;
  background-image: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.72)),
    url('https://assets.nflxext.com/ffe/siteui/vlv3/f841d4c7-10e1-40af-bcae-07a3f8dc141a/f6d7434e-d6de-4185-a6d4-c77a2d08737b/TR-tr-20220502-popsignuptwoweeks-perspective_alpha_website_large.jpg');
  background-size: cover; background-position: center;
}
.auth-card { background: rgba(0,0,0,.78); padding: 48px 56px; border-radius: 10px; width: 100%; max-width: 450px; }
.auth-card h2 { margin: 0 0 28px; font-size: 2rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; background: #333; border: 1px solid transparent; border-radius: 4px;
  color: #fff; font-size: 1rem; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #888; outline: none; }
.btn-main {
  width: 100%; padding: 14px; background: var(--primary); color: #fff; border: 0; border-radius: 4px;
  font-size: 1.05rem; font-weight: 700; cursor: pointer; margin-top: 8px;
}
.btn-main:hover { background: #f40612; }
.btn-main:disabled { opacity: .55; cursor: wait; }
.form-error { color: var(--warn); font-size: .9rem; min-height: 1.2em; margin: 10px 0 0; }
.auth-alt { margin-top: 22px; color: var(--muted); font-size: .95rem; }
.auth-alt a { color: #fff; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

.welcome-bg {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.8)),
    url('https://assets.nflxext.com/ffe/siteui/vlv3/f841d4c7-10e1-40af-bcae-07a3f8dc141a/f6d7434e-d6de-4185-a6d4-c77a2d08737b/TR-tr-20220502-popsignuptwoweeks-perspective_alpha_website_large.jpg') center/cover;
}
.welcome-bg .hero-text h1 { font-size: clamp(2rem, 6vw, 3.5rem); margin: 0 0 18px; }
.welcome-bg .hero-text p { font-size: clamp(1.1rem, 3vw, 1.5rem); margin: 0 0 30px; }
.cta-buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn-primary, .btn-secondary {
  padding: 14px 30px; color: #fff; border: 0; border-radius: 5px; font-size: 1.15rem; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-primary { background: var(--primary); }
.btn-secondary { background: rgba(109,109,110,.7); }

/* ---- Profil seçimi ---- */
.profiles-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.profile-title { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 30px; font-weight: 500; }
.profile-grid { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.profile-card { text-align: center; cursor: pointer; transition: transform .2s; width: 150px; background: none; border: 0; color: inherit; padding: 0; position: relative; }
.profile-card:hover, .profile-card:focus-visible { transform: scale(1.08); }
.profile-card:hover .profile-avatar, .profile-card:focus-visible .profile-avatar { border-color: #fff; }
.profile-avatar {
  width: 150px; height: 150px; border-radius: 10px; background-size: cover; background-position: center; background-color: #2a2a2a;
  border: 3px solid transparent; margin-bottom: 10px; position: relative; display: flex; align-items: center; justify-content: center;
}
.profile-avatar .edit-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; font-size: 2rem; border-radius: 8px; }
.managing .profile-avatar .edit-overlay { display: flex; }
.profile-name { color: var(--muted); font-size: 1.15rem; }
.profile-card:hover .profile-name { color: #fff; }
.kid-chip { position: absolute; top: 6px; right: 6px; background: #1db954; color: #000; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.manage-btn { margin-top: 44px; border: 1px solid var(--muted); background: transparent; color: var(--muted); padding: 10px 28px; font-size: 1.1rem; cursor: pointer; letter-spacing: 2px; }
.manage-btn:hover { color: #fff; border-color: #fff; }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px; }
.avatar-choice { width: 56px; height: 56px; border-radius: 8px; background-size: cover; background-position: center; background-color: #2a2a2a; border: 3px solid transparent; cursor: pointer; padding: 0; }
.avatar-choice.selected { border-color: #fff; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.8); display: none; align-items: center; justify-content: center; z-index: 3000; padding: 16px; }
.modal-bg.show { display: flex; }
.modal-card { background: #181818; border: 1px solid #333; border-radius: 10px; padding: 28px; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; }
.modal-card h3 { margin: 0 0 18px; font-size: 1.4rem; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn-ghost { background: transparent; border: 1px solid #666; color: #fff; padding: 10px 18px; border-radius: 4px; cursor: pointer; font-size: .95rem; }
.btn-ghost:hover { border-color: #fff; }
.btn-danger { background: #b81d24; border: 0; color: #fff; padding: 10px 18px; border-radius: 4px; cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; color: #ddd; }
.check-row input { width: 18px; height: 18px; }

/* ---- Sayfa iskeleti (header altı sayfalar) ---- */
.page-wrap { padding: 100px 4% 60px; max-width: 1500px; margin: 0 auto; position: relative; z-index: 1; }
.page-wrap h1 { margin: 0 0 8px; }
.page-sub { color: var(--muted); margin: 0 0 28px; }
.user-menu { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.user-menu .avatar { cursor: pointer; }
.nav-link { cursor: pointer; }

/* ---- Canlı TV ---- */
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding: 90px 4% 40px; min-height: 100vh; }
.live-stage { position: relative; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; align-self: start; }
.live-stage video { width: 100%; height: 100%; background: #000; }
.live-stage .plyr { height: 100%; }
.live-now { margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.live-now img { width: 56px; height: 56px; object-fit: contain; background: #222; border-radius: 8px; padding: 4px; }
.live-badge { background: var(--primary); color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 4px; letter-spacing: 1px; }
.live-overlay { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: rgba(0,0,0,.82); z-index: 20; padding: 20px; }
.live-overlay.show { display: flex; }
.spinner-lg { width: 44px; height: 44px; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.live-side { background: #181818; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; max-height: calc(100vh - 120px); position: sticky; top: 90px; }
.live-side header { all: unset; display: block; padding: 14px; border-bottom: 1px solid var(--line); }
.live-search { width: 100%; padding: 10px 12px; background: #2a2a2a; border: 0; border-radius: 6px; color: #fff; }
.live-cats { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px 4px; scrollbar-width: none; }
.live-cat { background: #2a2a2a; color: #ddd; border: 0; border-radius: 16px; padding: 5px 12px; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.live-cat.active { background: #fff; color: #000; }
.channel-list { overflow-y: auto; padding: 8px; flex: 1; }
.channel-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; cursor: pointer; border: 0; background: none; color: inherit; width: 100%; text-align: left; }
.channel-item:hover { background: #262626; }
.channel-item.active { background: #333; box-shadow: inset 3px 0 0 var(--primary); }
.channel-logo { width: 44px; height: 44px; border-radius: 8px; background: #2a2a2a center/contain no-repeat; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #aaa; }
.channel-meta { min-width: 0; flex: 1; }
.channel-meta b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-meta small { color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #666; margin-right: 6px; }
.status-dot.up { background: var(--ok); } .status-dot.down { background: var(--bad); }
.empty-state { text-align: center; color: var(--muted); padding: 50px 20px; }
@media (max-width: 960px) {
  .live-layout { grid-template-columns: 1fr; }
  .live-side { position: static; max-height: 60vh; }
}

/* ---- Planlar ---- */
.plans-hero { text-align: center; margin-bottom: 34px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; max-width: 1100px; margin: 0 auto; }
.plan-card { background: #181818; border: 2px solid #2d2d2d; border-radius: 14px; padding: 28px 24px; display: flex; flex-direction: column; position: relative; transition: transform .2s, border-color .2s; }
.plan-card:hover { transform: translateY(-4px); }
.plan-card.highlight { border-color: var(--primary); background: linear-gradient(180deg, #2a0f12, #181818 55%); }
.plan-card.current { border-color: var(--ok); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); font-size: .72rem; font-weight: 800; padding: 4px 12px; border-radius: 12px; letter-spacing: 1px; white-space: nowrap; }
.plan-card.current .plan-badge { background: var(--ok); color: #000; }
.plan-name { font-size: 1.5rem; font-weight: 700; margin: 6px 0 4px; }
.plan-price { font-size: 2rem; font-weight: 800; margin: 8px 0; }
.plan-tagline { color: #bbb; margin-bottom: 8px; }
.plan-comment { color: #d7d7d7; font-style: italic; font-size: .95rem; border-left: 3px solid var(--primary); padding-left: 12px; margin: 10px 0 16px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan-features li { padding: 7px 0; border-bottom: 1px solid #262626; color: #ddd; display: flex; gap: 10px; }
.plan-features li i { color: var(--ok); margin-top: 3px; }
.demo-note { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 28px; }

/* ---- Ödeme (gösterim) ---- */
.checkout-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; max-width: 980px; margin: 0 auto; }
.checkout-box { background: #181818; border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.checkout-box h3 { margin: 0 0 18px; }
.demo-banner { background: #3a2a05; border: 1px solid #8a6a12; color: #ffd36b; padding: 10px 14px; border-radius: 8px; font-size: .9rem; margin-bottom: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #262626; color: #ddd; }
.summary-row.total { font-weight: 800; font-size: 1.15rem; border: 0; color: #fff; }
@media (max-width: 800px) { .checkout-grid { grid-template-columns: 1fr; } .auth-card { padding: 32px 22px; } }

/* Profil fotoğrafı seçici: kategorili (Netflix gibi) */
.av-scroll { max-height: 340px; overflow-y: auto; margin: 6px 0 16px; padding-right: 6px; }
.av-cat { margin-bottom: 14px; }
.av-cat-title { font-size: .95rem; font-weight: 700; color: #ddd; margin-bottom: 6px; }
.av-cat .avatar-picker { margin: 0; }
.modal-card { max-height: 92vh; overflow-y: auto; }

.plans-alert { max-width: 720px; margin: 18px auto 0; padding: 12px 16px; border-radius: 10px; font-size: .95rem; line-height: 1.5; border: 1px solid #444; background: #1c1c1c; color: #ddd; }
.plans-alert.warn { border-color: #7a5b12; background: #2a2208; color: #ffd98a; }
.plans-alert.ok { border-color: #1f6b3a; background: #0f2a18; color: #8be8ab; }

/* Yakında / Yeni rozetleri */
.dfx-badge{position:absolute;top:6px;left:6px;z-index:6;pointer-events:none;border-radius:4px;padding:3px 7px;font-size:.62rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;line-height:1.1;box-shadow:0 2px 8px rgba(0,0,0,.5);display:flex;flex-direction:column;gap:1px}
.dfx-badge.new{background:#e50914;color:#fff}
.dfx-badge.soon{background:linear-gradient(135deg,#f5b301,#ff7a00);color:#111}
.dfx-badge small{font-size:.58rem;font-weight:700;letter-spacing:0;text-transform:none;opacity:.85}
.q-tag-big~.dfx-badge,.poster-wrap .dfx-badge{top:12px;left:12px;font-size:.8rem;padding:5px 10px}
.card:hover .dfx-badge{opacity:0}
.details-hero.is-soon .container{transition:opacity .6s ease}
.details-hero.is-soon.tr-bg-on.soon-dim .container{opacity:.07}
.details-hero.is-soon .hero-overlay-dark{transition:opacity .6s}
.details-hero.is-soon.tr-bg-on.soon-dim .hero-overlay-dark{opacity:.3}
/* alt kenar her durumda yumuşak geçişle sayfa rengine bağlanır (şeffafken sert kesim olmasın) */
.details-hero.is-soon::after{content:"";position:absolute;left:0;right:0;bottom:0;height:42%;z-index:5;pointer-events:none;background:linear-gradient(to bottom,rgba(15,17,21,0) 0%,rgba(15,17,21,.6) 55%,#0f1115 100%)}
.soon-pill{display:inline-flex;align-items:center;gap:8px;background:linear-gradient(135deg,#f5b301,#ff7a00);color:#111;font-weight:900;border-radius:6px;padding:10px 20px}
.dfx-badge.season{background:linear-gradient(135deg,#8b5cf6,#6366f1);color:#fff}
.dfx-badge.episodes{background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff}
.cast-line{margin:10px 0 4px;color:#cfcfcf;font-size:.95rem;line-height:1.5}
.cast-label{color:#8a8a8a;font-weight:700;margin-right:4px}
.cast-more{background:none;border:0;color:#fff;font-weight:700;cursor:pointer;padding:0 0 0 4px;text-decoration:underline;font:inherit}
