/* ===========================================================
   Fighter Bull's — Student Portal  (Light theme)
   Brand green matched to fighterbulls.in (primary #19b036)
   =========================================================== */
:root {
    --bg: #f4f6fb;
    --bg-grad-1: #eef9f0;
    --bg-grad-2: #f4f6fb;
    --card: #ffffff;
    --card-hover: #ffffff;
    --border: #e7eaf1;
    --border-strong: #d7dbe6;
    --text: #1d2233;
    --muted: #6b7280;
    --primary: #19b036;          /* fighterbulls.in brand green */
    --primary-2: #4cc466;        /* light green highlight */
    --primary-hover: #009614;    /* deep green (hover/active) */
    --accent: #7cb305;           /* secondary lime accent */
    --accent-soft: #eaf5d6;
    --danger: #e11d48;
    --success: #16a34a;
    --warning: #f59e0b;
    --radius: 16px;
    --shadow-sm: 0 2px 8px rgba(29, 34, 51, .06);
    --shadow: 0 12px 34px rgba(25, 176, 54, .10), 0 4px 14px rgba(29, 34, 51, .06);
    --ring: 0 0 0 4px rgba(25, 176, 54, .14);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(900px 500px at 90% -10%, #d9f5de 0%, transparent 60%),
        radial-gradient(700px 500px at -10% 0%, #eef7dd 0%, transparent 55%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .45; transform: scale(.85);} }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes glowPulse { 0%,100% { filter: drop-shadow(0 6px 14px rgba(25,176,54,.25)); } 50% { filter: drop-shadow(0 8px 22px rgba(124,179,5,.35)); } }

.animate-up { opacity: 0; animation: fadeUp .55s cubic-bezier(.2,.7,.2,1) forwards; }
.animate-up:nth-child(1){animation-delay:.04s}.animate-up:nth-child(2){animation-delay:.10s}
.animate-up:nth-child(3){animation-delay:.16s}.animate-up:nth-child(4){animation-delay:.22s}
.animate-up:nth-child(5){animation-delay:.28s}.animate-up:nth-child(6){animation-delay:.34s}
.animate-up:nth-child(7){animation-delay:.40s}.animate-up:nth-child(8){animation-delay:.46s}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .animate-up{opacity:1;} }

/* ---------- Top bar ---------- */
.topbar { background: rgba(255,255,255,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; animation: fadeIn .5s ease; }
.topbar-inner { max-width: 1140px; margin: 0 auto; padding: 10px 22px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand img { height: 46px; width: auto; display: block; animation: glowPulse 4s ease-in-out infinite; transition: transform .25s; }
.brand:hover img { transform: scale(1.05) rotate(-1deg); }
.topnav { display: flex; gap: 8px; flex: 1; margin-left: 6px; }
.topnav a { color: var(--muted); font-weight: 600; font-size: .92rem; padding: 8px 14px; border-radius: 10px; transition: .18s; }
.topnav a:hover { color: var(--primary); background: #eef9f0; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-chip { background: #fff; padding: 7px 15px; border-radius: 999px; font-size: .88rem; font-weight: 600; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: .18s; }
.user-chip:hover { border-color: var(--primary); color: var(--primary); }
.logout-form { margin: 0; }

/* ---------- Layout ---------- */
.page { max-width: 1140px; width: 100%; margin: 0 auto; padding: 30px 22px 70px; flex: 1; }
.footer { border-top: 1px solid var(--border); color: var(--muted); background: #fff; }
.footer-inner { max-width: 1140px; margin: 0 auto; padding: 18px 22px; font-size: .85rem; }

h1 { font-size: 1.9rem; margin: 0 0 6px; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; margin: 34px 0 16px; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 5px; height: 20px; border-radius: 4px; background: linear-gradient(180deg, var(--primary-2), var(--primary)); }
.subtitle { color: var(--muted); margin: 0 0 24px; }
.section-label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #bfe6c6; }
.card-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, #4cc466, #19b036); display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: rgba(255,255,255,.9); position: relative; }
.card-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.12)); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 18px; }
.card-title { font-weight: 700; margin: 0 0 6px; }
.card-meta { color: var(--muted); font-size: .85rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; border: none; padding: 11px 20px; border-radius: 11px; font-weight: 700; cursor: pointer; font-size: .92rem; box-shadow: 0 6px 16px rgba(25,176,54,.28); transition: transform .15s, box-shadow .15s, filter .15s; position: relative; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(25,176,54,.36); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 9px; }
.btn-ghost { background: #fff; border: 1px solid var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: #f1faf3; border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); }
.btn-live { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 6px 16px rgba(225,29,72,.3); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.3); transform: none; box-shadow: none; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; }
.badge-live { background: #ffe4e6; color: #be123c; }
.badge-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); animation: pulse 1.3s infinite; }
.badge-soon { background: #fef3c7; color: #b45309; }
.badge-ended { background: #eef0f4; color: var(--muted); }
.badge-preview { background: var(--accent-soft); color: #4d7c0f; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }
.list-row { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 13px; padding: 14px 16px; box-shadow: var(--shadow-sm); transition: transform .16s, border-color .16s, box-shadow .16s; }
.list-row:hover { border-color: #bfe6c6; transform: translateX(3px); box-shadow: var(--shadow); }
.list-row .icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg,#e6f7ea,#cef4d2); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.15rem; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .row-title { font-weight: 700; }
.list-row .row-meta { color: var(--muted); font-size: .83rem; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 54px 20px; color: var(--muted); border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: rgba(255,255,255,.5); }

/* ---------- Alerts ---------- */
.messages { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.alert { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm); }
.alert-error { border-left: 4px solid var(--danger); }
.alert-success { border-left: 4px solid var(--success); }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; overflow: hidden; }
.auth-wrap::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(25,176,54,.14), transparent 70%); top: -160px; right: -120px; }
.auth-wrap::after { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(124,179,5,.16), transparent 70%); bottom: -160px; left: -120px; }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 38px 36px; width: 100%; max-width: 410px; box-shadow: var(--shadow); position: relative; z-index: 1; animation: fadeUp .6s cubic-bezier(.2,.7,.2,1); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 8px; }
.auth-logo img { height: 84px; animation: floaty 5s ease-in-out infinite; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: .9rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; margin-bottom: 6px; color: var(--text); font-weight: 600; }
.field input { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border-strong); background: #fbfbfd; color: var(--text); font-size: .95rem; transition: .18s; }
.field input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: var(--ring); }
.form-error { color: #be123c; font-size: .85rem; margin-top: 14px; background: #ffe4e6; padding: 10px 12px; border-radius: 10px; }

/* Show/hide password */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none;
    border: none; cursor: pointer; font-size: 1.05rem; padding: 6px 8px; border-radius: 8px; opacity: .55;
    line-height: 1; }
.pw-toggle:hover { opacity: 1; background: #f1f3f8; }
.pw-toggle.on { opacity: 1; }

/* "or" divider */
.or-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: .8rem; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Google button */
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    padding: 11px 16px; border: 1px solid var(--border-strong); border-radius: 11px; background: #fff;
    color: #1f2433; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-sm); transition: .16s; }
.gbtn:hover { background: #f7f8fb; border-color: #c7ccd8; box-shadow: var(--shadow); }
.gbtn img { display: block; }

/* ---------- Course header ---------- */
.course-hero { display: flex; gap: 26px; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; }
.course-hero .art { width: 240px; aspect-ratio: 16/9; border-radius: 14px; background: linear-gradient(135deg,#4cc466,#19b036); flex-shrink: 0; overflow: hidden; display:flex; align-items:center; justify-content:center; font-size:2.2rem; color:rgba(255,255,255,.9); box-shadow: var(--shadow); }
.course-hero .art img { width: 100%; height: 100%; object-fit: cover; }
.course-hero .grow { flex: 1; min-width: 240px; }

/* ---------- Lesson / player page ---------- */
.player-layout { display: grid; grid-template-columns: 1fr 330px; gap: 26px; align-items: start; }
@media (max-width: 880px) { .player-layout { grid-template-columns: 1fr; } }

/* Branded player — no YouTube chrome visible */
.vplayer { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); animation: fadeIn .5s ease; }
.vplayer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vplayer .click-shield { position: absolute; inset: 0; z-index: 5; }
.vplayer .top-mask { position: absolute; top: 0; left: 0; right: 0; height: 64px; z-index: 6; background: linear-gradient(to bottom, rgba(0,0,0,.45), transparent); pointer-events: none; }
.vplayer .center-btn { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; }
.vplayer .center-btn button { width: 78px; height: 78px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; font-size: 1.8rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(25,176,54,.5); transition: transform .15s; }
.vplayer .center-btn button:hover { transform: scale(1.08); }
.vplayer .loading { position:absolute; inset:0; z-index:7; display:flex; align-items:center; justify-content:center; color:#cbd0dc; }

.controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; padding: 10px 14px; background: linear-gradient(to top, rgba(0,0,0,.85), transparent); display: flex; align-items: center; gap: 12px; opacity: 0; transition: opacity .2s; }
.vplayer:hover .controls, .vplayer.paused .controls { opacity: 1; }
.controls button { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; }
.controls .time { color: #fff; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.controls .seek { flex: 1; height: 5px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,.3); border-radius: 5px; cursor: pointer; }
.controls .seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--primary-2); }
.controls select { background: rgba(255,255,255,.15); color: #fff; border: none; border-radius: 6px; padding: 3px 6px; font-size: .8rem; }

.playlist { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.playlist h3 { margin: 0; padding: 15px 17px; font-size: .95rem; border-bottom: 1px solid var(--border); background: #fafbfd; }
.playlist-item { display: flex; gap: 12px; padding: 13px 17px; border-bottom: 1px solid var(--border); align-items: center; transition: background .15s; }
.playlist-item:last-child { border-bottom: none; }
.playlist-item:hover { background: #f1faf3; }
.playlist-item.active { background: #e6f7ea; box-shadow: inset 3px 0 0 var(--primary); }
.playlist-item .num { width: 28px; height: 28px; border-radius: 8px; background: #eef0f4; display:flex; align-items:center; justify-content:center; font-size:.78rem; font-weight:700; color: var(--muted); flex-shrink:0; }
.playlist-item.active .num { background: linear-gradient(135deg,var(--primary-2),var(--primary)); color: #fff; }
.playlist-item .pl-title { font-size: .88rem; font-weight: 600; }
.playlist-item .pl-meta { font-size: .75rem; color: var(--muted); }

.lesson-nav { display: flex; justify-content: space-between; margin-top: 18px; gap: 12px; }

/* ---------- Plan badges / locked states ---------- */
.badge-plan { background: var(--accent-soft); color: #4d7c0f; }
.badge-plan.plan-dark { background: #e7ebf3; color: #1d2233; }
.badge-plan.plan-gold { background: #fdf0cf; color: #92660a; }
.badge-locked { background: #f1f1f4; color: #6b7280; }
.badge-upgrade { background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; margin-left: 8px; }
.list-row.is-locked { opacity: .72; background: repeating-linear-gradient(45deg,#fff,#fff 12px,#fbfbfd 12px,#fbfbfd 24px); }
.list-row.is-locked:hover { transform: none; }
.playlist-item.locked { opacity: .6; }

.thumb-plan { position: absolute; top: 10px; right: 10px; font-size: .7rem; font-weight: 800; padding: 4px 10px;
    border-radius: 999px; background: rgba(255,255,255,.92); color: #1d2233; }
.thumb-plan.plan-dark { background: #1d2233; color: #fff; }
.thumb-plan.plan-gold { background: #f5c542; color: #4a3500; }

/* ---------- Pricing page ---------- */
.price-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; margin-top: 26px; }
.price-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 28px 24px 26px;
    display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.price-card.highlight { background: linear-gradient(180deg, #10233a, #0b1830); color: #fff; border: none; transform: translateY(-8px); box-shadow: 0 20px 50px rgba(11,24,48,.4); }
.price-card.highlight .price-term, .price-card.highlight .price-name { color: #cfe0ff; }
.price-card.accent-gold { border-color: #f3d27a; }
.price-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap;
    background: linear-gradient(135deg, #1faa59, #16a34a); color: #fff; font-size: .72rem; font-weight: 800;
    padding: 5px 16px; border-radius: 999px; letter-spacing: .03em; box-shadow: 0 6px 16px rgba(22,163,74,.35); }
.accent-gold .price-badge { background: linear-gradient(135deg, #f5c542, #e0a800); color: #3a2a00; box-shadow: 0 6px 16px rgba(224,168,0,.4); }
.price-name { font-size: 1.15rem; font-weight: 800; margin-bottom: 12px; }
.price-amount { font-size: 2.7rem; font-weight: 800; line-height: 1; display: flex; align-items: flex-start; gap: 3px; }
.price-amount .cur { font-size: 1.1rem; margin-top: 8px; font-weight: 700; }
.price-card.accent-gold .price-amount, .price-card.accent-green .price-amount { color: var(--text); }
.price-card.highlight .price-amount { color: #fff; }
.price-card.accent-gold .price-amount { color: #16a34a; }
.price-term { color: var(--muted); font-size: .8rem; letter-spacing: .06em; margin-top: 6px; margin-bottom: 18px; }
.price-features { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.price-features li { font-size: .9rem; display: flex; align-items: flex-start; gap: 9px; }
.price-features .tick { color: #16a34a; font-weight: 800; }
.price-card.highlight .price-features .tick { color: #4ade80; }
.price-cta { display: block; text-align: center; padding: 12px; border-radius: 11px; font-weight: 700;
    border: 1.5px solid #16a34a; color: #16a34a; transition: .16s; }
.price-cta:hover { background: #16a34a; color: #fff; }
.price-card.highlight .price-cta { background: #fff; color: #0b1830; border-color: #fff; }
.price-card.highlight .price-cta:hover { background: #e8eefc; }
.accent-gold .price-cta { background: linear-gradient(135deg, #1faa59, #16a34a); color: #fff; border: none; }
.accent-gold .price-cta:hover { filter: brightness(1.07); }
