@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #0a0e1a;
  --bg-alt: #111827;
  --panel: #1e2433;
  --panel-hover: #252d40;
  --border: rgba(255,255,255,0.07);
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --accent-glow: rgba(99,102,241,0.25);
  --cyan: #22d3ee;
  --green: #10b981;
  --pink: #ec4899;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.site-header {
  background: rgba(17,24,39,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.logo span {
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-right { display: flex; align-items: center; gap: 16px; }
.search-wrap { position: relative; }
.search-wrap input {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px 10px 40px; color: var(--text); font-size: 14px;
  width: 280px; outline: none; transition: all 0.3s; font-family: inherit;
}
.search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); width: 340px; }
.search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); width: 18px; height: 18px;
}
.tg-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #2AABEE, #229ED9); color: #fff;
  padding: 10px 18px; border-radius: 12px; text-decoration: none;
  font-size: 13px; font-weight: 600; transition: all 0.2s;
}
.tg-link:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(42,171,238,0.4); }
.tg-link svg { width: 20px; height: 20px; fill: currentColor; }

/* ===== HERO ===== */
.hero {
  text-align: center; padding: 60px 24px 40px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow), transparent 70%);
}
.hero h1 { font-size: 42px; font-weight: 900; letter-spacing: -1px; margin-bottom: 12px; position: relative; }
.hero h1 span {
  background: linear-gradient(135deg, var(--cyan), var(--accent), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 16px; color: var(--text-dim); max-width: 500px; margin: 0 auto; position: relative; }

/* Stats */
.stats-row {
  display: flex; justify-content: center; gap: 32px; margin-top: 32px; position: relative;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: 28px; font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 1px; }

/* ===== FILTER ===== */
.filter-bar {
  max-width: 1400px; margin: 0 auto 32px; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.filter-btn {
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 18px; color: var(--text-dim); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.filter-btn:hover { background: var(--panel-hover); color: var(--text); }
.filter-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* Sub-filter bar */
.sub-filter-bar {
  max-width: 1400px; margin: -16px auto 28px; padding: 0 24px;
  display: none; flex-wrap: wrap; gap: 8px; justify-content: center;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity:0; transform: translateY(-8px); } to { opacity:1; transform: translateY(0); } }
.sub-btn {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 16px; color: var(--text-dim); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.sub-btn:hover { background: var(--panel-hover); color: var(--text); border-color: var(--accent); }
.sub-btn.active {
  background: linear-gradient(135deg, var(--accent2), var(--pink));
  color: #fff; border-color: transparent;
}

/* Sub-category tag on cards */
.tag-subcat { background: rgba(236,72,153,0.15); color: #f9a8d4; }

.courses-container { max-width: 1400px; margin: 0 auto; padding: 0 24px 80px; }
.course-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px;
}

/* Course Card */
.course-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: all 0.3s; position: relative;
}
.course-card:hover {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 30px var(--accent-glow);
}
.card-thumb {
  height: 140px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-thumb .icon { font-size: 48px; position: relative; z-index: 1; }
.card-thumb .bg-grad {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0.2; transition: opacity 0.3s;
}
.course-card:hover .bg-grad { opacity: 0.35; }
.card-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: #fff;
}
.card-body { padding: 16px 18px 18px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.tag-subject { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.tag-doctor { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.card-topics {
  font-size: 11px; color: var(--text-muted); margin-bottom: 6px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title {
  font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.vid-count { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.vid-count svg { width: 16px; height: 16px; }
.enter-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; padding: 7px 16px; border-radius: 10px;
  font-size: 12px; font-weight: 700; text-decoration: none;
  transition: all 0.2s; border: none; cursor: pointer; font-family: inherit;
}
.enter-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px var(--accent-glow); }

/* ===== COURSE VIEW (Video Player Page) ===== */
.course-view { display: none; max-width: 1400px; margin: 0 auto; padding: 20px 24px 80px; }
.course-view.active { display: flex; gap: 24px; }
.back-btn {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 16px; color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
}
.back-btn:hover { background: var(--panel-hover); border-color: var(--accent); }
.player-col { flex: 1; min-width: 0; }
.player-wrapper {
  width: 100%; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden;
  background: #000; box-shadow: var(--shadow); position: relative;
}
.player-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.player-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--text-muted); gap: 12px;
}
.player-placeholder svg { width: 64px; height: 64px; opacity: 0.3; }
.now-playing-info { margin-top: 16px; }
.now-playing-info h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.now-playing-info p { font-size: 13px; color: var(--text-dim); }
.player-nav { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.player-nav button, .player-nav a {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 16px; color: var(--text); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.player-nav button:hover, .player-nav a:hover { background: var(--panel-hover); border-color: var(--accent); }
.player-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.player-nav .btn-yt { color: #ef4444; border-color: rgba(239,68,68,0.3); }
.player-nav .btn-watched { color: var(--green); border-color: rgba(16,185,129,0.3); }

/* Sidebar video list */
.sidebar-col {
  width: 360px; flex-shrink: 0; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 120px);
}
.sidebar-header { padding: 16px; border-bottom: 1px solid var(--border); }
.sidebar-header h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.sidebar-header .progress-track {
  height: 4px; background: var(--panel); border-radius: 99px; overflow: hidden; margin-top: 8px;
}
.sidebar-header .progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 99px; transition: width 0.5s;
}
.sidebar-search { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.sidebar-search input {
  width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; color: var(--text); font-size: 13px; outline: none; font-family: inherit;
}
.sidebar-search input:focus { border-color: var(--accent); }
.video-list-scroll { overflow-y: auto; flex: 1; }
.video-list-scroll::-webkit-scrollbar { width: 4px; }
.video-list-scroll::-webkit-scrollbar-thumb { background: var(--panel-hover); border-radius: 99px; }
.vid-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer; transition: all 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.vid-item:hover { background: var(--panel-hover); }
.vid-item.active { background: rgba(99,102,241,0.15); border-left: 3px solid var(--accent); }
.vid-item.watched { opacity: 0.5; }
.vid-num {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: var(--panel); border-radius: 8px; flex-shrink: 0;
}
.vid-item.active .vid-num { background: var(--accent); color: #fff; }
.vid-name { font-size: 13px; color: var(--text-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vid-item.active .vid-name { color: var(--text); font-weight: 500; }
.watched-check { color: var(--green); font-size: 14px; display: none; }
.vid-item.watched .watched-check { display: block; }

/* ===== FOOTER ===== */
.site-footer {
  text-align: center; padding: 40px 24px;
  font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border);
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

/* ===== GLOBAL TOUCH & SCROLL ===== */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* iOS safe area padding */
.site-header {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-left: calc(24px + env(safe-area-inset-left, 0px));
  padding-right: calc(24px + env(safe-area-inset-right, 0px));
}

/* ===== TABLET (iPad / 601px-1024px) ===== */
@media (max-width: 1024px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hero h1 { font-size: 34px; }
  .hero { padding: 48px 20px 32px; }
  .courses-container { padding: 0 20px 60px; }
  .filter-bar { padding: 0 20px; margin-bottom: 24px; }
  .search-wrap input { width: 220px; }
  .search-wrap input:focus { width: 280px; }
}

/* ===== SMALL TABLET / LARGE PHONE (481px-768px) ===== */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .header-right { width: 100%; justify-content: space-between; }
  .search-wrap { flex: 1; }
  .search-wrap input, .search-wrap input:focus { width: 100%; }
  .tg-link { padding: 10px 14px; font-size: 12px; }
  .tg-link span { display: none; } /* Hide text, keep icon on small screens */
  .tg-link::after { content: '@iwanna2die'; }

  .hero h1 { font-size: 28px; letter-spacing: -0.5px; }
  .hero p { font-size: 14px; }
  .hero { padding: 40px 16px 28px; }
  .stats-row { gap: 20px; }
  .stat-num { font-size: 24px; }

  /* Horizontal scroll filter on smaller screens */
  .filter-bar {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    padding: 0 16px; margin-bottom: 20px; gap: 6px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; padding: 10px 16px; font-size: 12px; min-height: 44px; }

  .course-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .courses-container { padding: 0 16px 60px; }
  .card-thumb { height: 120px; }
  .card-thumb .icon { font-size: 36px; }
  .card-body { padding: 12px 14px 14px; }
  .card-title { font-size: 14px; margin-bottom: 10px; }
  .enter-btn { padding: 8px 14px; font-size: 11px; min-height: 44px; display: flex; align-items: center; }

  .course-view.active { flex-direction: column; }
  .sidebar-col { width: 100%; max-height: 50vh; }
}

/* ===== PHONE (max 480px) ===== */
@media (max-width: 480px) {
  .site-header { padding: 12px 12px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .logo { font-size: 18px; }
  .header-right { gap: 8px; }
  .tg-link { padding: 8px 12px; border-radius: 10px; }
  .tg-link svg { width: 18px; height: 18px; }
  .tg-link::after { font-size: 11px; }

  .hero { padding: 32px 12px 24px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 13px; }
  .stats-row { gap: 16px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 10px; }

  .course-grid { grid-template-columns: 1fr; gap: 12px; }
  .courses-container { padding: 0 12px 40px; }
  .card-thumb { height: 110px; }
  .card-body { padding: 12px; }
  .card-title { font-size: 14px; }
  .vid-count { font-size: 12px; }
  .tag { font-size: 10px; padding: 3px 8px; }
  .card-badge { font-size: 10px; padding: 3px 10px; }

  .site-footer { padding: 30px 12px; font-size: 11px; }
}

/* ===== VERY SMALL PHONE (max 360px) ===== */
@media (max-width: 360px) {
  .hero h1 { font-size: 20px; }
  .stat-num { font-size: 20px; }
  .logo { font-size: 16px; }
  .card-footer { flex-direction: column; gap: 8px; align-items: stretch; }
  .enter-btn { text-align: center; justify-content: center; }
}

/* ===== LANDSCAPE PHONE ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 20px 16px 16px; }
  .hero h1 { font-size: 22px; }
  .stats-row { margin-top: 12px; }
  .course-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* ===== HOVER ONLY FOR NON-TOUCH ===== */
@media (hover: none) {
  .course-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
  .course-card:active { transform: scale(0.98); transition: transform 0.1s; }
  .enter-btn:hover { transform: none; }
  .enter-btn:active { transform: scale(0.95); }
  .tg-link:hover { transform: none; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Animations */
@keyframes fadeUp { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }
.course-card { animation: fadeUp 0.4s ease forwards; }

/* ===== COURSE VIDEO VIEW ===== */
.course-view {
  display: none;
  max-width: 1400px; margin: 0 auto; padding: 20px 24px;
  gap: 24px;
}
.course-view.active {
  display: grid;
  grid-template-columns: 1fr 380px;
}

/* Player Column */
.player-col { display: flex; flex-direction: column; gap: 16px; }

.back-btn {
  background: rgba(99,102,241,0.12); color: #a5b4fc; border: none;
  padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; width: fit-content; transition: all 0.2s;
}
.back-btn:hover { background: rgba(99,102,241,0.25); }

.player-wrapper {
  position: relative; width: 100%; padding-top: 56.25%; /* 16:9 */
  background: #0d0f1a; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.player-wrapper iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.player-placeholder {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted); gap: 12px;
}
.player-placeholder svg { width: 48px; height: 48px; opacity: 0.3; }

.now-playing-info h2 {
  font-size: 18px; font-weight: 700; color: var(--text-primary); margin: 0;
  line-height: 1.4;
}
.now-playing-info p {
  font-size: 13px; color: var(--text-muted); margin: 6px 0 0;
}

.player-nav {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.player-nav button, .player-nav .btn-yt {
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.08); padding: 8px 16px;
  border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.player-nav button:hover:not(:disabled) { background: rgba(99,102,241,0.2); color: #a5b4fc; }
.player-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-watched { background: rgba(16,185,129,0.12) !important; color: #6ee7b7 !important; }
.btn-watched:hover { background: rgba(16,185,129,0.25) !important; }

/* Sidebar Column */
.sidebar-col {
  background: var(--card-bg); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; max-height: calc(100vh - 40px);
  position: sticky; top: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}
.sidebar-header {
  padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-header h3 {
  font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.progress-track {
  width: 100%; height: 4px; background: rgba(255,255,255,0.06);
  border-radius: 4px; margin-top: 10px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, #6366f1, #10b981);
  border-radius: 4px; transition: width 0.4s ease;
}
.sidebar-search {
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-search input {
  width: 100%; padding: 8px 12px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  color: var(--text-primary); font-size: 13px; outline: none;
  box-sizing: border-box;
}
.sidebar-search input:focus { border-color: #6366f1; }

.video-list-scroll {
  flex: 1; overflow-y: auto; padding: 8px;
}
.video-list-scroll::-webkit-scrollbar { width: 4px; }
.video-list-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.vid-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; cursor: pointer; transition: all 0.15s;
  margin-bottom: 2px; position: relative;
}
.vid-item:hover { background: rgba(99,102,241,0.08); }
.vid-item.active {
  background: rgba(99,102,241,0.15); border-left: 3px solid #6366f1;
}
.vid-item.watched .vid-name { color: var(--text-muted); }
.vid-item.watched .watched-check { opacity: 1; }

.vid-num {
  min-width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border-radius: 6px;
  font-size: 11px; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}
.vid-item.active .vid-num { background: #6366f1; color: #fff; }

.vid-name {
  flex: 1; font-size: 13px; color: var(--text-secondary); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.watched-check {
  color: #10b981; font-size: 14px; font-weight: 700; opacity: 0;
  flex-shrink: 0; transition: opacity 0.2s;
}

/* ===== RESPONSIVE VIDEO VIEW ===== */
@media (max-width: 900px) {
  .course-view.active {
    grid-template-columns: 1fr;
  }
  .sidebar-col {
    position: static; max-height: 50vh;
  }
}
@media (max-width: 600px) {
  .course-view { padding: 12px 16px; gap: 16px; }
  .player-nav { gap: 6px; }
  .player-nav button { padding: 8px 12px; font-size: 12px; }
  .sidebar-col { max-height: 45vh; }
  .now-playing-info h2 { font-size: 15px; }
  /* Auth header mobile */
  .tg-link { display: none; }
  .login-link { padding: 5px 10px; font-size: 12px; }
  .login-link i { font-size: 11px; }
  .user-avatar-btn { width: 32px; height: 32px; font-size: 12px; }
  .user-dropdown { right: -10px; width: calc(100vw - 40px); max-width: 280px; }
  .header-right { gap: 8px; }
  .search-wrap { min-width: 0; }
  .search-wrap input { width: 80px; font-size: 12px; }
  /* Auth page mobile */
  .auth-card { padding: 28px 20px; }
  .auth-card h1 { font-size: 20px; }
  /* Toast mobile */
  .toast-container { right: 10px; left: 10px; width: auto; max-width: none; }
}

/* ===== SECURITY: ANTI RIGHT-CLICK / COPY ===== */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select { -webkit-user-select: text; user-select: text; }

/* ===== AUTH HEADER BUTTON ===== */
.auth-header-btn { position: relative; }
.login-link {
  color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 8px; background: rgba(99,102,241,0.12);
  transition: all 0.3s ease; display: flex; align-items: center; gap: 6px;
}
.login-link:hover { background: rgba(99,102,241,0.25); color: #a5b4fc; }

.user-avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid #6366f1;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.user-avatar-btn:hover { transform: scale(1.1); box-shadow: 0 0 12px rgba(99,102,241,0.4); }

.user-dropdown {
  display: none; position: absolute; top: 48px; right: 0; width: 240px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); z-index: 1000; overflow: hidden;
}
.user-dropdown.open { display: block; animation: fadeUp 0.2s ease; }
.dropdown-header {
  padding: 16px; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.dropdown-header strong { color: var(--text-primary); font-size: 14px; }
.dropdown-header small { color: var(--text-muted); font-size: 11px; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; width: 100%;
  background: none; border: none; color: var(--text-secondary); font-size: 13px;
  cursor: pointer; text-decoration: none; transition: background 0.15s;
}
.dropdown-item:hover { background: rgba(99,102,241,0.08); color: #a5b4fc; }
.dropdown-item i { width: 16px; text-align: center; }

/* ===== ROLE BADGES ===== */
.role-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.role-user { background: rgba(107,114,128,0.2); color: #9ca3af; }
.role-staff { background: rgba(59,130,246,0.2); color: #60a5fa; }
.role-admin { background: rgba(245,158,11,0.2); color: #fbbf24; }
.role-super { background: rgba(239,68,68,0.2); color: #f87171; }

/* ===== AUTH PAGE ===== */
.auth-container {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--panel); border-radius: 20px;
  padding: 40px 32px; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.auth-logo { font-size: 48px; text-align: center; margin-bottom: 8px; }
.auth-card h1 { text-align: center; font-size: 24px; color: var(--text-primary); margin: 0 0 4px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }

.auth-alert {
  padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-error { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.alert-success { background: rgba(16,185,129,0.1); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.2); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; color: var(--text-secondary); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input-icon {
  position: relative; display: flex; align-items: center;
}
.input-icon > i { position: absolute; left: 14px; color: var(--text-muted); font-size: 14px; pointer-events: none; }
.input-icon input {
  width: 100%; padding: 12px 14px 12px 40px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 10px; color: var(--text-primary);
  font-size: 14px; outline: none; transition: border-color 0.2s; box-sizing: border-box;
}
.input-icon input:focus { border-color: #6366f1; }
.toggle-pass {
  position: absolute; right: 12px; background: none; border: none;
  color: var(--text-muted); cursor: pointer; padding: 4px;
}

.pass-strength { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.strength-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.strength-fill { height: 100%; width: 0; transition: all 0.3s; border-radius: 4px; }

.auth-btn {
  width: 100%; padding: 14px; background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.google-btn {
  width: 100%;
  padding: 12px;
  background: white;
  color: #333;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.google-btn img {
  width: 20px;
  height: 20px;
}

.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-footer { text-align: center; margin-top: 20px; }
.auth-footer p { color: var(--text-muted); font-size: 13px; }
.auth-footer a { color: #6366f1; text-decoration: none; font-weight: 600; }
.back-link { display: inline-block; margin-top: 12px; color: var(--text-muted); font-size: 13px; text-decoration: none; }

/* ===== PROFILE PAGE ===== */
.profile-page { max-width: 800px; margin: 80px auto 40px; padding: 0 20px; }
.loading-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 0; color: var(--text-muted); }
.nav-link { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; }

.profile-header-card {
  display: flex; align-items: center; gap: 20px; padding: 24px;
  background: var(--panel); border-radius: 16px; border: 1px solid var(--border);
  margin-bottom: 24px;
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.profile-header-info h1 { font-size: 20px; color: var(--text-primary); margin: 0; }
.profile-header-info p { color: var(--text-muted); font-size: 13px; margin: 4px 0; }

.profile-tabs { display: flex; gap: 4px; margin-bottom: 20px; overflow-x: auto; }
.ptab {
  padding: 10px 18px; background: none; border: none; color: var(--text-muted);
  font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 8px;
  transition: all 0.2s; white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
.ptab:hover { background: rgba(255,255,255,0.04); }
.ptab.active { background: rgba(99,102,241,0.12); color: #a5b4fc; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.settings-card {
  background: var(--panel); border-radius: 16px; padding: 24px;
  border: 1px solid var(--border);
}
.settings-card h3 { font-size: 16px; color: var(--text-primary); margin: 0 0 20px; }
.settings-input {
  width: 100%; padding: 10px 14px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary);
  font-size: 14px; outline: none; box-sizing: border-box; font-family: inherit;
}
.settings-input:focus { border-color: #6366f1; }

.save-btn {
  padding: 10px 20px; background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; margin-top: 12px; display: flex; align-items: center; gap: 6px;
}
.save-msg { margin-top: 10px; font-size: 13px; padding: 8px 12px; border-radius: 8px; }
.msg-error { background: rgba(239,68,68,0.1); color: #f87171; }
.msg-success { background: rgba(16,185,129,0.1); color: #6ee7b7; }

/* Subscription cards in profile */
.subs-list { display: flex; flex-direction: column; gap: 12px; }
.sub-card {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
}
.sub-card.expiring { border-color: rgba(245,158,11,0.4); }
.sub-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sub-plan-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.sub-status { font-size: 12px; font-weight: 600; }
.sub-status.active { color: #10b981; }
.sub-status.expired { color: #ef4444; }
.sub-desc { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.sub-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.sub-details div { display: flex; flex-direction: column; }
.sub-details small { color: var(--text-muted); font-size: 11px; }
.sub-details span { color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.text-warning { color: #f59e0b !important; }
.empty-state { text-align: center; padding: 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); }

/* ===== ADMIN DASHBOARD ===== */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 260px; background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0;
  height: 100vh; z-index: 100;
}
.admin-brand {
  padding: 20px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.admin-brand span { font-size: 28px; }
.admin-brand h2 { font-size: 16px; color: var(--text-primary); margin: 0; }

.admin-nav { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav-btn {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; width: 100%;
  background: none; border: none; color: var(--text-secondary); font-size: 13px;
  font-weight: 500; cursor: pointer; border-radius: 10px; transition: all 0.15s;
  text-decoration: none;
}
.admin-nav-btn:hover { background: rgba(99,102,241,0.08); }
.admin-nav-btn.active { background: rgba(99,102,241,0.15); color: #a5b4fc; font-weight: 600; }
.admin-nav-btn i { width: 18px; text-align: center; }

.admin-sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.admin-info { padding: 12px; margin-bottom: 4px; }

.admin-main { flex: 1; margin-left: 260px; padding: 24px; overflow-x: hidden; }

.admin-section { display: none; }
.admin-section.active { display: block; }

.section-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 12px; margin-bottom: 20px;
}
.section-header h2 { font-size: 20px; color: var(--text-primary); margin: 0; display: flex; align-items: center; gap: 8px; }

.admin-search {
  padding: 8px 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-primary); font-size: 13px; outline: none; width: 250px;
}

/* Stats row */
.stats-row { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; min-width: 120px; flex: 1;
}
.stat-num { font-size: 28px; font-weight: 800; color: #6366f1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Admin tables */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td {
  padding: 12px 16px; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.user-cell { display: flex; align-items: center; gap: 10px; }
.mini-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.email-text { font-family: monospace; font-size: 12px; color: var(--text-muted); }
.role-select {
  padding: 4px 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-secondary); font-size: 12px; outline: none;
}
.role-select option {
  background: var(--bg-card, #0f1423);
  color: #e2e8f0;
}

/* Subscription badges (inline with roles) */
.sub-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  margin-left: 4px; vertical-align: middle;
}
.sub-badge.active {
  background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3);
}
.sub-badge.expired {
  background: rgba(107,114,128,0.15); color: #9ca3af; border: 1px solid rgba(107,114,128,0.2);
  text-decoration: line-through; opacity: 0.6;
}
.sub-badge small { font-weight: 400; opacity: 0.8; }
.sub-badge-x {
  background: none; border: none; color: inherit; cursor: pointer; font-size: 14px;
  line-height: 1; padding: 0 2px; opacity: 0.6; transition: opacity 0.15s;
}
.sub-badge-x:hover { opacity: 1; color: #ef4444; }

/* Action buttons */
.action-btn {
  padding: 8px 14px; background: rgba(255,255,255,0.06); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px;
}
.action-btn:hover { background: rgba(99,102,241,0.12); }
.btn-primary { background: #6366f1; color: #fff; border-color: #6366f1; }
.btn-primary:hover { background: #5558e6; }
.btn-danger { color: #ef4444; }
.btn-danger:hover { background: rgba(239,68,68,0.12); }

/* Plans grid */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.plan-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  transition: all 0.2s;
}
.plan-card.inactive { opacity: 0.5; }
.plan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.plan-header h4 { font-size: 16px; color: var(--text-primary); margin: 0; }
.plan-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(239,68,68,0.15); color: #f87171; }
.plan-status.active { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.plan-desc { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.plan-price { font-size: 28px; font-weight: 800; color: #6366f1; }
.plan-price small { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.plan-duration { color: var(--text-muted); font-size: 13px; margin: 4px 0 12px; }
.plan-actions { display: flex; gap: 8px; }

/* Modals */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 20px;
}
.modal-card {
  background: var(--panel); border-radius: 16px; padding: 28px;
  width: 100%; max-width: 500px; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.modal-card h3 { font-size: 18px; color: var(--text-primary); margin: 0 0 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Course access grid */
.course-access-grid { display: flex; flex-direction: column; gap: 8px; }
.course-access-item {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  flex-wrap: wrap; transition: border-color 0.3s;
}
.ca-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 120px; }
.ca-id { font-weight: 700; font-size: 13px; color: var(--text-primary); }
.ca-count { font-size: 12px; color: var(--text-muted); }
.ca-toggle { display: flex; align-items: center; gap: 10px; }
.ca-label { font-size: 12px; font-weight: 700; min-width: 65px; }
.ca-label.free { color: #10b981; }
.ca-label.paid { color: #f59e0b; }
.ca-legend { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.settings-input option, select.settings-input option {
  background: var(--bg-card, #0f1423);
  color: #e2e8f0;
}

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(245,158,11,0.3); border-radius: 24px; transition: all 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: all 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: rgba(16,185,129,0.3); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Activity log */
.log-action {
  padding: 2px 8px; background: rgba(99,102,241,0.12); border-radius: 4px;
  font-size: 11px; font-weight: 600; color: #a5b4fc; text-transform: capitalize;
}
.log-details { font-size: 11px; color: var(--text-muted); background: rgba(0,0,0,0.2); padding: 2px 6px; border-radius: 4px; }

/* Mobile menu button */
.mobile-menu-btn {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 200;
  width: 40px; height: 40px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--border); color: var(--text-primary); font-size: 18px;
  cursor: pointer;
}

/* ===== ADMIN RESPONSIVE ===== */
@media (max-width: 900px) {
  .admin-sidebar {
    transform: translateX(-100%); transition: transform 0.3s;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .admin-search { width: 100%; }
}
@media (max-width: 600px) {
  .profile-header-card { flex-direction: column; text-align: center; }
  .profile-tabs { gap: 2px; }
  .ptab { padding: 8px 12px; font-size: 12px; }
  .plans-grid { grid-template-columns: 1fr; }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px; width: calc(100% - 40px);
}
.toast {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4); position: relative; overflow: hidden;
  transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show { transform: translateX(0); }
.toast-success { border-left: 3px solid #10b981; }
.toast-error { border-left: 3px solid #ef4444; }
.toast-warning { border-left: 3px solid #f59e0b; }
.toast-info { border-left: 3px solid #6366f1; }

.toast-icon { flex-shrink: 0; width: 20px; height: 20px; }
.toast-success .toast-icon { color: #10b981; }
.toast-error .toast-icon { color: #ef4444; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-info .toast-icon { color: #6366f1; }

.toast-body { flex: 1; }
.toast-msg { font-size: 13px; color: var(--text-primary); margin: 0; line-height: 1.4; }
.toast-close {
  background: none; border: none; color: var(--text-muted); font-size: 18px;
  cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0;
}
.toast-progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.05);
}
.toast-progress-bar {
  height: 100%; width: 100%; border-radius: 0 0 12px 12px;
  animation: toastShrink linear forwards;
}
.toast-success .toast-progress-bar { background: #10b981; }
.toast-error .toast-progress-bar { background: #ef4444; }
.toast-warning .toast-progress-bar { background: #f59e0b; }
.toast-info .toast-progress-bar { background: #6366f1; }
@keyframes toastShrink { from { width: 100%; } to { width: 0%; } }

/* ===== CUSTOM CONFIRM DIALOG ===== */
.confirm-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; padding: 20px; opacity: 0; transition: opacity 0.2s;
}
.confirm-overlay.show { opacity: 1; }
.confirm-card {
  background: var(--panel); border-radius: 20px; padding: 32px;
  width: 100%; max-width: 400px; text-align: center;
  border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.9); transition: transform 0.2s;
}
.confirm-overlay.show .confirm-card { transform: scale(1); }

.confirm-icon-wrap { margin-bottom: 16px; }
.confirm-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%; font-size: 28px;
}
.confirm-icon-warning { background: rgba(245,158,11,0.12); }
.confirm-icon-danger { background: rgba(239,68,68,0.12); }
.confirm-icon-info { background: rgba(99,102,241,0.12); }
.confirm-icon-role { background: rgba(59,130,246,0.12); }
.confirm-icon-subscription { background: rgba(245,158,11,0.12); }

.confirm-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; }
.confirm-msg { font-size: 14px; color: var(--text-muted); margin: 0 0 24px; line-height: 1.5; }

.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-btn {
  padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none;
}
.confirm-cancel {
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.confirm-cancel:hover { background: rgba(255,255,255,0.1); }
.confirm-ok { color: #fff; }
.confirm-ok-warning { background: #f59e0b; }
.confirm-ok-warning:hover { background: #d97706; }
.confirm-ok-danger { background: #ef4444; }
.confirm-ok-danger:hover { background: #dc2626; }
.confirm-ok-info { background: #6366f1; }
.confirm-ok-info:hover { background: #5558e6; }
.confirm-ok-role { background: #3b82f6; }
.confirm-ok-role:hover { background: #2563eb; }
.confirm-ok-subscription { background: #f59e0b; }
.confirm-ok-subscription:hover { background: #d97706; }

/* ===== YOUTUBE TOP CLICK BLOCKER ===== */
.yt-top-block {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 70px;
  z-index: 10;
  cursor: default;
}

/* ===== CUSTOM PLAYER CONTROLS ===== */
.custom-player-ui {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  z-index: 20;
  display: flex;
  align-items: flex-end;
  padding: 0 16px 16px 16px;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}
.custom-player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.cp-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.1s;
}
.cp-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}
.cp-btn:active {
  transform: scale(0.95);
}
.cp-timeline-wrap {
  flex: 1;
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: height 0.1s ease;
}
.cp-timeline-wrap:hover {
  height: 6px;
}
.cp-timeline-buffer {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(255,255,255,0.4);
  pointer-events: none;
}
.cp-timeline-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: #f00; /* YouTube Red */
  pointer-events: none;
}
.cp-timeline-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #f00;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.1s ease;
  pointer-events: none;
  z-index: 4;
}
.cp-timeline-wrap:hover .cp-timeline-thumb {
  transform: translate(-50%, -50%) scale(1);
}
#cp-timeline {
  position: absolute;
  top: -10px; left: 0; right: 0; bottom: -10px;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}
#cp-time {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  min-width: 85px;
  text-align: center;
}

/* ===== ADMIN EXTRA STYLES ===== */
.btn-danger {
  background: rgba(239,68,68,0.15) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239,68,68,0.3) !important;
}

/* ===== FULLSCREEN FIXES ===== */
.player-wrapper.pseudo-fullscreen {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100vw !important; height: 100vh !important;
  max-width: none !important;
  padding-top: 0 !important;
  z-index: 99999 !important;
  border-radius: 0 !important;
  background: #000 !important;
}
.player-wrapper:fullscreen {
  padding-top: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
}
.player-wrapper:-webkit-full-screen {
  padding-top: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
}
.btn-danger:hover {
  background: rgba(239,68,68,0.25) !important;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group { flex: 1; }

