/* ==========================================================================
   EinfachAnto StreamSpace - Unified Stylesheet & Responsive Design System
   ========================================================================== */

/* 1. Global Variables & Design Tokens */
:root {
  --bg: #06040d;
  --bg-2: #0d0918;
  --surface: #151022;
  --surface-2: #1c1630;
  --surface-3: #231b3c;
  --border: rgba(150, 128, 255, 0.16);
  --text: #f5f1ff;
  --muted: #b7b0d3;
  --faint: #8278a7;
  --primary: #8451ff;
  --primary-2: #a96cff;
  --cyan: #22e8da;
  --pink: #ff4a92;
  --danger: #ff4f7c;
  --success: #22e88f;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --space-1: 4px; 
  --space-2: 8px; 
  --space-3: 12px; 
  --space-4: 16px; 
  --space-5: 20px; 
  --space-6: 24px; 
  --space-8: 32px; 
  --space-10: 40px; 
  --space-12: 48px; 
  --space-16: 64px;
  --container: 1220px;
  --font: 'Inter', sans-serif;
  --transition: 180ms cubic-bezier(.16,1,.3,1);
}

/* 2. Resets & Global Base Styles */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}
html { 
  scroll-behavior: smooth; 
}
body {
  font-family: var(--font);
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(132,81,255,.18), transparent 28%),
    linear-gradient(180deg, #0b0715 0%, #06040d 100%);
  overflow-x: hidden;
  padding-top: 110px; /* Space for floating header */
}
body.home-page {
  padding-top: 0;
}
body.admin-page {
  padding-top: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%2322e8da' stroke-opacity='.13'%3E%3Cpolygon points='24,10 38,18 38,34 24,42 10,34 10,18'/%3E%3Cpolygon points='132,24 150,36 150,58 132,70 114,58 114,36'/%3E%3Cpath d='M70 118l18 0 9 15-9 15H70l-9-15z'/%3E%3Cpath d='M150 120l22 0 11 19-11 19h-22l-11-19z'/%3E%3C/g%3E%3Cg fill='none' stroke='%237d4dff' stroke-opacity='.12'%3E%3Cpath d='M70 24l14 24H56z'/%3E%3Cpath d='M22 98l14 24H8z'/%3E%3Cpath d='M118 92l18 30H100z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 180px;
  background-position: center top;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.36));
}
a { 
  color: inherit; 
  text-decoration: none; 
}
img { 
  display: block; 
  max-width: 100%; 
}
button { 
  border: 0; 
  background: none; 
  color: inherit; 
  font: inherit; 
  cursor: pointer; 
}
.skip-link {
  position: absolute; 
  left: 12px; 
  top: -80px; 
  z-index: 999;
  padding: 10px 14px; 
  border-radius: 999px; 
  background: var(--primary);
}
.skip-link:focus { 
  top: 12px; 
}
.container { 
  width: min(calc(100% - 24px), var(--container)); 
  margin: 0 auto; 
}

/* 3. Global Layout Components */

/* Site Header */
.site-header {
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  z-index: 100;
  background: transparent; 
  border-bottom: none; 
  backdrop-filter: none;
  pointer-events: none; 
  padding: 18px 0;
}
.header-inner {
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 16px;
  min-height: 52px; 
  width: min(calc(100% - 32px), var(--container)); 
  margin: 0 auto;
  pointer-events: none;
}
.header-capsule {
  display: flex; 
  align-items: center; 
  gap: 8px;
  background: rgba(13, 9, 24, 0.72); 
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px); 
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px; 
  padding: 5px 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: auto; 
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.header-capsule:hover {
  border-color: rgba(132, 81, 255, 0.32);
  box-shadow: 0 12px 35px rgba(132, 81, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.brand {
  font-size: 17px; 
  font-weight: 800; 
  letter-spacing: -0.04em; 
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--text), #d3c4ff);
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent;
  display: inline-flex; 
  align-items: center;
}
.brand-accent {
  background: linear-gradient(135deg, var(--primary-2), var(--cyan));
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
.nav-pill {
  height: 38px; 
  padding: 0 16px; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  border-radius: 999px; 
  font-weight: 700; 
  font-size: 14px; 
  color: var(--muted);
  transition: all var(--transition); 
  border: 1px solid transparent;
}
.nav-pill:hover {
  color: var(--text); 
  background: rgba(255, 255, 255, 0.06);
}
.nav-pill.active {
  color: #fff; 
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 15px rgba(132, 81, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.admin-pill {
  border: 1px solid rgba(34, 232, 218, 0.2); 
  color: var(--cyan);
}
.admin-pill:hover {
  background: rgba(34, 232, 218, 0.1); 
  color: #fff;
}

.nav-dropdown-wrapper { 
  position: relative; 
}
.categories-dropdown {
  position: absolute; 
  top: calc(100% + 12px); 
  left: 50%; 
  transform: translateX(-50%) translateY(10px);
  background: rgba(18, 13, 30, 0.96); 
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md); 
  padding: 8px; 
  min-width: 180px;
  box-shadow: var(--shadow); 
  display: none; 
  flex-direction: column; 
  gap: 4px;
  opacity: 0; 
  transition: opacity 0.2s ease, transform 0.2s ease; 
  z-index: 200;
}
.categories-dropdown.active {
  display: flex; 
  opacity: 1; 
  transform: translateX(-50%) translateY(0);
}
.dropdown-item {
  padding: 10px 16px; 
  border-radius: 8px; 
  font-size: 14px; 
  font-weight: 600;
  color: var(--muted); 
  transition: all 0.15s ease; 
  text-align: left; 
  display: block;
}
.dropdown-item:hover {
  color: #fff; 
  background: rgba(132, 81, 255, 0.15);
}
.dropdown-item.all-categories {
  border-top: 1px solid rgba(255, 255, 255, 0.06); 
  margin-top: 4px; 
  padding-top: 12px; 
  color: var(--cyan);
}

.header-search-container {
  display: flex; 
  align-items: center; 
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 999px; 
  background: transparent;
}
.header-search-container.active {
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding-right: 12px;
}
.header-search-input {
  width: 0; 
  opacity: 0; 
  border: 0; 
  background: transparent; 
  color: #fff;
  font-family: inherit; 
  font-size: 13.5px; 
  font-weight: 600; 
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); 
  padding: 0;
}
.header-search-container.active .header-search-input {
  width: 140px; 
  opacity: 1; 
  padding-left: 6px;
}
.icon-btn {
  width: 36px; 
  height: 36px; 
  border-radius: 50%; 
  display: inline-flex; 
  align-items: center;
  justify-content: center; 
  color: var(--muted); 
  transition: all var(--transition);
}
.icon-btn:hover {
  color: #fff; 
  background: rgba(255, 255, 255, 0.08);
}
.notification-btn { 
  position: relative; 
}
.notification-badge {
  position: absolute; 
  top: 6px; 
  right: 6px; 
  width: 8px; 
  height: 8px;
  background: var(--pink); 
  border-radius: 50%; 
  box-shadow: 0 0 8px var(--pink);
  display: none;
}
.notification-btn.has-unreads .notification-badge { 
  display: block; 
}

.nav-login-btn {
  height: 38px; 
  padding: 0 20px; 
  border-radius: 999px; 
  font-weight: 800; 
  font-size: 14px;
  color: #fff; 
  background: linear-gradient(135deg, var(--primary), #925bff);
  box-shadow: 0 4px 14px rgba(132, 81, 255, 0.4); 
  transition: all var(--transition);
}
.nav-login-btn:hover {
  box-shadow: 0 6px 18px rgba(132, 81, 255, 0.6); 
  transform: translateY(-1px);
}

.user-info-trigger { 
  position: relative; 
}
.user-dropdown {
  position: absolute; 
  top: calc(100% + 12px); 
  right: 0;
  background: rgba(18, 13, 30, 0.96); 
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md); 
  padding: 8px; 
  min-width: 180px;
  box-shadow: var(--shadow); 
  display: none; 
  flex-direction: column; 
  gap: 4px;
  opacity: 0; 
  transition: opacity 0.2s ease, transform 0.2s ease; 
  z-index: 200;
}
.user-dropdown.active {
  display: flex; 
  opacity: 1; 
  transform: translateY(0);
}
.user-dropdown-header {
  padding: 10px 14px; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; 
  flex-direction: column; 
  margin-bottom: 4px;
}
.user-dropdown-name { 
  font-weight: 700; 
  font-size: 14px; 
  color: #fff; 
}
.user-dropdown-role { 
  font-size: 11px; 
  color: var(--muted); 
  margin-top: 2px; 
}
.logout-item { 
  color: var(--danger) !important; 
}
.logout-item:hover { 
  background: rgba(255, 79, 124, 0.15) !important; 
}

/* Modals */
.modal {
  position: fixed; 
  inset: 0; 
  z-index: 100; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: rgba(0,0,0,.7); 
  backdrop-filter: blur(8px); 
  opacity: 0; 
  pointer-events: none;
  transition: opacity 220ms ease;
}
.modal.active { 
  opacity: 1; 
  pointer-events: auto; 
}
.modal-head { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 8px; 
}
.modal-head h3 {
  font-size: 16px; 
  font-weight: 700;
}
.close-btn { 
  font-size: 24px; 
  cursor: pointer; 
  color: var(--muted); 
}
.close-btn:hover { 
  color: white; 
}

/* Login Modal */
.login-modal-content {
  width: min(100% - 24px, 400px); 
  background: #0f0b18;
  border: 1px solid rgba(132, 81, 255, 0.2); 
  border-radius: var(--radius-lg);
  padding: 24px; 
  box-shadow: 0 20px 60px rgba(0,0,0,.8), 0 0 30px rgba(132,81,255,0.1);
  transform: translateY(20px); 
  transition: transform 220ms ease;
}
.modal.active .login-modal-content { 
  transform: translateY(0); 
}
.login-modal-body { 
  padding-top: 10px; 
}
.login-prompt-text { 
  color: var(--muted); 
  font-size: 13.5px; 
  line-height: 1.5; 
  margin-bottom: 20px; 
}
.login-form-placeholder { 
  display: flex; 
  flex-direction: column; 
  gap: 14px; 
}
.form-group { 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
}
.form-group label { 
  font-size: 11px; 
  font-weight: 700; 
  color: var(--faint); 
  text-transform: uppercase; 
  letter-spacing: 0.05em; 
}
.form-input {
  background: rgba(0,0,0,0.3); 
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; 
  height: 42px; 
  padding: 0 14px; 
  color: #fff;
  font-family: inherit; 
  font-size: 14px; 
  outline: none; 
  transition: all 0.2s ease;
}
.form-input:focus { 
  border-color: rgba(132, 81, 255, 0.5); 
  background: rgba(0,0,0,0.5); 
}
.form-input:disabled { 
  opacity: 0.5; 
  cursor: not-allowed; 
}
.form-submit-btn {
  height: 42px; 
  border-radius: 10px; 
  font-weight: 700; 
  font-size: 14px;
  background: rgba(255, 255, 255, 0.04); 
  color: var(--faint);
  border: 1px solid rgba(255,255,255,0.06); 
  cursor: not-allowed; 
  transition: all 0.2s ease;
}
.login-divider { 
  position: relative; 
  text-align: center; 
  margin: 20px 0; 
}
.login-divider::before { 
  content: ""; 
  position: absolute; 
  left: 0; 
  top: 50%; 
  width: 100%; 
  height: 1px; 
  background: rgba(255,255,255,0.08); 
  z-index: 1; 
}
.login-divider span { 
  position: relative; 
  background: #0f0b18; 
  padding: 0 12px; 
  font-size: 11px; 
  color: var(--faint); 
  text-transform: uppercase; 
  letter-spacing: 0.05em; 
  z-index: 2; 
}
.twitch-auth-btn {
  height: 46px; 
  border-radius: 12px; 
  background: #9146ff; 
  color: #fff;
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 10px;
  font-weight: 800; 
  font-size: 15px; 
  box-shadow: 0 6px 20px rgba(145, 70, 255, 0.35);
  transition: all var(--transition);
}
.twitch-auth-btn:hover { 
  background: #a262ff; 
  box-shadow: 0 8px 24px rgba(145, 70, 255, 0.5); 
  transform: translateY(-1px); 
}

/* Schedule Modal Specific */
.schedule-modal-content {
  width: min(100% - 24px, 580px); 
  background: #0f0b18;
  border: 1px solid rgba(132, 81, 255, 0.2); 
  border-radius: var(--radius-lg);
  padding: 24px; 
  box-shadow: 0 20px 60px rgba(0,0,0,.8), 0 0 30px rgba(132,81,255,0.1);
}
.schedule-intro { 
  color: var(--muted); 
  font-size: 13.5px; 
  line-height: 1.5; 
  margin-bottom: 20px; 
}
.weekly-schedule { 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
}
.schedule-day {
  display: grid; 
  grid-template-columns: 100px 140px 1fr; 
  align-items: center;
  padding: 12px 18px; 
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04); 
  border-radius: 12px; 
  transition: all 0.2s ease;
}
.schedule-day.active { 
  background: rgba(132, 81, 255, 0.04); 
  border-color: rgba(132, 81, 255, 0.15); 
}
.schedule-day.active:hover { 
  background: rgba(132, 81, 255, 0.08); 
  border-color: rgba(132, 81, 255, 0.3); 
}
.day-name { 
  font-weight: 800; 
  color: #fff; 
}
.schedule-day.active .day-name { 
  color: var(--primary-2); 
}
.day-time { 
  font-weight: 600; 
  font-size: 14px; 
  color: var(--muted); 
}
.day-status { 
  font-size: 13.5px; 
  font-weight: 600; 
  color: var(--faint); 
  text-align: right; 
}
.schedule-day.active .day-status { 
  color: var(--cyan); 
}

/* Alert Banner Styling */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.alert-success {
  background: rgba(34, 232, 218, 0.1);
  border-color: rgba(34, 232, 218, 0.25);
  color: var(--cyan);
}
.alert-danger {
  background: rgba(255, 79, 124, 0.1);
  border-color: rgba(255, 79, 124, 0.25);
  color: var(--danger);
}

/* Big Live Banner */
.big-live-banner {
  background: linear-gradient(90deg, rgba(255, 74, 115, 0.95), rgba(132, 81, 255, 0.95));
  border-bottom: 2px solid var(--pink);
  padding: 14px 0;
  color: white;
  box-shadow: 0 8px 32px rgba(255, 74, 115, 0.25);
  position: relative;
  z-index: 70;
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.big-live-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.live-pulse-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-pulse {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}
.live-text {
  font-weight: 900;
  letter-spacing: 0.05em;
  font-size: 14px;
  background: rgba(0,0,0,0.2);
  padding: 4px 10px;
  border-radius: 6px;
}
.live-details {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}
.live-game-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.live-watch-btn {
  background: white;
  color: #7b4dff;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all var(--transition);
}
.live-watch-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  color: #ff4a73;
}

/* Global Footer */
.footer {
  margin-top: 26px; 
  background: rgba(0,0,0,.58); 
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 56px 0 36px;
}
.footer h3 { 
  font-size: 26px; 
  margin-bottom: 24px; 
}
.footer p { 
  color: var(--muted); 
}
.footer-links {
  display: flex; 
  flex-wrap: wrap; 
  gap: 18px 26px; 
  margin-top: 18px; 
  padding-top: 18px; 
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-links a { 
  font-weight: 600; 
  color: #f0eaff; 
}
.social-row { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 10px; 
  margin-top: 18px; 
}
.social-row a {
  min-height: 34px; 
  padding: 0 12px; 
  border-radius: 999px; 
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  background: rgba(255,255,255,.04); 
  border: 1px solid rgba(255,255,255,.06); 
  color: var(--muted); 
  font-size: 14px;
}
.social-row a:hover { 
  color: white; 
  border-color: rgba(132,81,255,.36); 
  background: rgba(132,81,255,.12); 
}

/* 4. Page Specific Styles - Home (index.php) */

/* Hero & Hero Card */
.hero { 
  padding-top: 0; 
}
.hero-stage {
  position: relative; 
  min-height: 600px; 
  overflow: hidden; 
  border-radius: 0 0 28px 28px;
  background: #140f23; 
  box-shadow: var(--shadow);
}
.hero-slide { 
  position: absolute; 
  inset: 0; 
  opacity: 0; 
  transition: opacity 320ms ease; 
  pointer-events: none; 
}
.hero-slide.active { 
  opacity: 1; 
  pointer-events: auto; 
}
.hero-slide img {
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position: center; 
  filter: blur(1px) brightness(.62) saturate(1.05);
  transform: scale(1.02);
}
.hero-slide::after {
  content: ""; 
  position: absolute; 
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3,2,8,.35), transparent 30%, transparent 70%, rgba(3,2,8,.45)),
    linear-gradient(180deg, rgba(8,6,14,.2), rgba(8,6,14,.08) 26%, rgba(8,6,14,.6) 65%, rgba(8,6,14,.96) 100%);
}
.hero-card-container {
  position: absolute; 
  left: 0; 
  right: 0; 
  bottom: 42px; 
  z-index: 10;
  padding: 0 24px; 
  display: flex; 
  justify-content: center; 
  pointer-events: none;
}
.hero-stream-card {
  width: 100%; 
  max-width: 1060px;
  background: linear-gradient(135deg, rgba(20, 15, 34, 0.76) 0%, rgba(13, 9, 24, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08); 
  border-radius: 24px;
  padding: 20px 24px; 
  box-shadow: var(--shadow), 0 0 40px rgba(132, 81, 255, 0.08);
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px);
  display: flex; 
  flex-direction: column; 
  gap: 16px; 
  pointer-events: auto;
  transform: translateY(0); 
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-stream-card:hover {
  border-color: rgba(132, 81, 255, 0.22);
  box-shadow: var(--shadow), 0 0 50px rgba(132, 81, 255, 0.14);
}
.card-main-content { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: 24px; 
  flex-wrap: wrap; 
}
.card-left-info { 
  flex: 1; 
  min-width: 280px; 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
}
.badge-title-row { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  flex-wrap: wrap; 
}
.card-status-badge {
  display: inline-flex; 
  align-items: center; 
  height: 26px; 
  padding: 0 10px;
  border-radius: 6px; 
  font-size: 11.5px; 
  font-weight: 900; 
  letter-spacing: 0.05em;
  text-transform: uppercase; 
  color: #fff;
}
.card-status-badge.live {
  background: linear-gradient(135deg, #ff4a73, #ff5f8e);
  box-shadow: 0 0 12px rgba(255, 74, 115, 0.5);
  animation: miniPulse 2.2s infinite ease-in-out;
}
@keyframes miniPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 74, 115, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(255, 74, 115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 74, 115, 0); }
}
.card-status-badge.offline {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.card-title-text {
  font-size: clamp(1.4rem, 2vw, 1.8rem); 
  font-weight: 800; 
  color: #fff;
  line-height: 1.2; 
  letter-spacing: -0.03em; 
  margin: 0;
  display: -webkit-box; 
  -webkit-line-clamp: 1; 
  -webkit-box-orient: vertical; 
  overflow: hidden;
}
.card-sub-text { 
  font-size: 14.5px; 
  font-weight: 600; 
  color: var(--muted); 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin: 0; 
}
.card-meta-separator { 
  color: var(--faint); 
}
.card-right-actions { 
  display: flex; 
  gap: 12px; 
  align-items: center; 
}
.card-action-btn {
  height: 46px; 
  padding: 0 22px; 
  border-radius: 12px; 
  display: inline-flex; 
  align-items: center;
  justify-content: center; 
  gap: 8px; 
  font-weight: 800; 
  font-size: 14.5px; 
  transition: all var(--transition);
}
.watch-btn-neon {
  background: linear-gradient(135deg, #ff4a73, #ff5f8e); 
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 74, 115, 0.25);
}
.watch-btn-neon:hover {
  box-shadow: 0 8px 22px rgba(255, 74, 115, 0.4); 
  transform: translateY(-1px);
}
.calendar-btn-neon {
  background: rgba(132, 81, 255, 0.12); 
  border: 1px solid rgba(132, 81, 255, 0.25);
  color: var(--primary-2);
}
.calendar-btn-neon:hover {
  background: rgba(132, 81, 255, 0.2); 
  border-color: rgba(132, 81, 255, 0.4);
  color: #fff; 
  transform: translateY(-1px);
}
.card-tabs-row { 
  display: flex; 
  gap: 8px; 
  border-top: 1px solid rgba(255, 255, 255, 0.06); 
  padding-top: 14px; 
  flex-wrap: wrap; 
}
.card-tab-item {
  height: 34px; 
  padding: 0 14px; 
  border-radius: 8px; 
  display: inline-flex; 
  align-items: center;
  gap: 6px; 
  font-size: 13px; 
  font-weight: 700; 
  color: var(--muted);
  background: rgba(255,255,255,0.03); 
  border: 1px solid rgba(255,255,255,0.04); 
  transition: all 0.2s ease;
}
.card-tab-item:hover { 
  color: #fff; 
  background: rgba(255,255,255,0.06); 
}
.card-tab-item.active {
  color: var(--cyan); 
  background: rgba(34, 232, 218, 0.08); 
  border-color: rgba(34, 232, 218, 0.15);
}
.tab-indicator { 
  width: 6px; 
  height: 6px; 
  border-radius: 50%; 
  background: var(--faint); 
}
.card-tab-item.active .tab-indicator { 
  background: var(--cyan); 
  box-shadow: 0 0 6px var(--cyan); 
}

.hero-nav {
  position: absolute; 
  left: 0; 
  right: 0; 
  bottom: 18px;
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 10px;
  z-index: 3;
}
.hero-thumb {
  width: 70px; 
  height: 8px; 
  border-radius: 999px; 
  background: rgba(255,255,255,0.12); 
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.05);
}
.hero-thumb button { 
  width: 100%; 
  height: 100%; 
  display: block; 
  background: transparent; 
}
.hero-thumb.active { 
  background: rgba(123,77,255,.32); 
}
.hero-thumb.active button { 
  background: linear-gradient(90deg, #6c45ff, #aa73ff); 
}
.hero-side-nav {
  position: absolute; 
  right: 18px; 
  top: 50%; 
  transform: translateY(-50%);
  display: grid; 
  gap: 10px; 
  z-index: 3;
}
.hero-arrow {
  width: 46px; 
  height: 46px; 
  border-radius: 999px; 
  background: rgba(8,6,14,.4); 
  border: 1px solid rgba(255,255,255,.08); 
  backdrop-filter: blur(10px);
  font-size: 24px;
}

/* Sections & Grids */
.content { 
  padding: 24px 0 38px; 
}
.section { 
  margin-top: 18px; 
}
.section-head { 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
  margin-bottom: 14px; 
}
.section-head h2 { 
  font-size: clamp(2rem, 3vw, 3rem); 
  line-height: .98; 
  letter-spacing: -.05em; 
}
.section-head a { 
  width: fit-content; 
  color: var(--muted); 
  font-size: 22px; 
  font-weight: 600; 
}
.section-line { 
  width: min(420px, 100%); 
  height: 4px; 
  border-radius: 999px; 
  background: rgba(255,255,255,.06); 
  overflow: hidden; 
  margin-top: 2px; 
}
.section-line span {
  display: block; 
  width: 100%; 
  max-width: 420px; 
  height: 100%; 
  background: linear-gradient(90deg, #1cf0d4, #21e0ff);
  box-shadow: 0 0 20px rgba(28,240,212,.35);
}

/* Card Grid & Stream Cards */
.card-grid { 
  display: grid; 
  grid-template-columns: repeat(4, minmax(0,1fr)); 
  gap: 24px; 
  margin-top: 22px; 
}
.stream-card {
  background: linear-gradient(180deg, rgba(35,27,60,.72), rgba(28,22,48,.92));
  border-radius: 18px; 
  overflow: hidden; 
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 12px 28px rgba(0,0,0,.24); 
  transition: transform var(--transition), border-color var(--transition);
}
.stream-card:hover { 
  transform: translateY(-4px); 
  border-color: rgba(34,232,218,.32); 
}
.stream-image { 
  position: relative; 
  aspect-ratio: 16 / 9; 
  background: #100c1b; 
}
.stream-image img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position: center; 
}
.stream-overlay {
  position: absolute; 
  inset: auto 10px 10px 10px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: 10px;
  color: white; 
  font-size: 13px; 
  font-weight: 700;
}
.mini-time, .mini-index {
  min-height: 24px; 
  padding: 0 8px; 
  border-radius: 8px; 
  display: inline-flex; 
  align-items: center; 
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.06);
}
.mini-index {
  border-color: var(--cyan);
  color: var(--cyan);
}
.stream-body { 
  padding: 14px 14px 16px; 
}
.stream-title {
  font-size: 17px; 
  line-height: 1.22; 
  font-weight: 800; 
  letter-spacing: -.02em; 
  min-height: 62px;
  display: -webkit-box; 
  -webkit-line-clamp: 3; 
  -webkit-box-orient: vertical; 
  overflow: hidden;
}
.stream-meta {
  margin-top: 14px; 
  display: flex; 
  justify-content: space-between; 
  gap: 10px; 
  color: var(--muted); 
  font-size: 14px; 
  font-weight: 600;
}

/* Modal specific for VOD popup */
.modal-content {
  width: min(100% - 24px, 960px);
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  transform: translateY(20px);
  transition: transform 220ms ease;
}
.iframe-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.iframe-container iframe {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* 5. Page Specific Styles - Categories (categories.php) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  margin-top: 22px;
}
.category-card {
  background: linear-gradient(180deg, rgba(35, 27, 60, 0.72) 0%, rgba(28, 22, 48, 0.92) 100%);
  border-radius: 18px; 
  overflow: hidden; 
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24); 
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 232, 218, 0.32);
  box-shadow: 0 16px 36px rgba(132, 81, 255, 0.25);
}
.category-image {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #100c1b;
  overflow: hidden;
}
.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.category-card:hover .category-image img {
  transform: scale(1.05);
}
.category-overlay-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(132, 81, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.category-body {
  padding: 16px;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.category-placeholder-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #18132c 0%, #2b2149 100%);
  color: var(--muted);
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 6. Page Specific Styles - Videothek (videothek.php) */
.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-group svg {
  position: absolute;
  left: 14px;
  color: var(--faint);
  font-size: 16px;
  pointer-events: none;
}
.search-input-group input {
  width: 100%;
  height: 46px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 40px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(132,81,255,0.22);
}
.clear-search-btn {
  position: absolute;
  right: 14px;
  color: var(--faint);
  font-size: 22px;
  cursor: pointer;
  text-decoration: none;
}
.clear-search-btn:hover {
  color: white;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.select-wrapper {
  position: relative;
}
.select-wrapper select {
  height: 46px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 38px 0 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition);
}
.select-wrapper select:focus {
  outline: none;
  border-color: var(--primary);
}
.select-wrapper::after {
  content: '▼';
  font-size: 9px;
  color: var(--faint);
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Empty State */
.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 64px 24px;
  text-align: center;
  margin-top: 24px;
  box-shadow: var(--shadow);
}
.empty-state-icon {
  font-size: 54px;
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 22px;
  margin-bottom: 8px;
  font-weight: 700;
}
.empty-state p {
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto 20px;
}

/* Pagination */
.pagination {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-link {
  min-height: 40px;
  min-width: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  font-weight: 700;
  color: var(--muted);
  transition: all var(--transition);
  user-select: none;
}
.page-link:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.16);
  color: white;
}
.page-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(132,81,255,.3);
}
.page-arrow {
  font-size: 14px;
}
.page-dots {
  color: var(--faint);
  font-weight: 700;
  padding: 0 4px;
}

/* 7. Page Specific Styles - Profile (profile.php) */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.profile-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-display-name {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-badge.admin {
  background: rgba(255, 79, 124, 0.12);
  border: 1px solid var(--danger);
  color: var(--danger);
}
.profile-badge.own {
  background: rgba(34, 232, 218, 0.12);
  border: 1px solid var(--cyan);
  color: var(--cyan);
}
.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
}
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}
.platform-badge.discord {
  background: #5865F2;
  box-shadow: 0 4px 10px rgba(88, 101, 242, 0.2);
}
.platform-badge.twitch {
  background: #9146ff;
  box-shadow: 0 4px 10px rgba(145, 70, 255, 0.2);
}
.platform-badge svg {
  display: block;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.section-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title span.count {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

/* Watchlist Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.video-card {
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(132, 81, 255, 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.thumb-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.thumb-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.video-card:hover .thumb-img { 
  transform: scale(1.04); 
}
.duration-badge {
  position: absolute; 
  bottom: 8px; 
  right: 8px;
  background: rgba(0,0,0,0.76); 
  backdrop-filter: blur(4px);
  padding: 3px 8px; 
  border-radius: 6px; 
  font-size: 11.5px; 
  font-weight: 700;
}
.card-body { 
  padding: 16px; 
}
.card-video-title {
  font-size: 14.5px; 
  font-weight: 700; 
  line-height: 1.4; 
  color: #fff;
  margin-bottom: 8px; 
  display: -webkit-box; 
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical; 
  overflow: hidden;
}
.card-meta {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  font-size: 11.5px; 
  color: var(--faint); 
  font-weight: 600;
}
.placeholder-text {
  color: var(--faint); 
  text-align: center; 
  font-size: 14px; 
  padding: 40px 0;
}

/* Timeline */
.timeline { 
  display: flex; 
  flex-direction: column; 
  gap: 16px; 
}
.timeline-item {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s;
  position: relative;
}
.timeline-item:hover {
  border-color: rgba(132, 81, 255, 0.15);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 8px;
}
.timeline-stream-link {
  color: var(--cyan);
  text-decoration: underline;
  font-weight: 700;
}
.timeline-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  word-break: break-word;
}

/* Settings Layout */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}
.settings-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
}
.settings-desc {
  font-size: 12.5px;
  color: var(--muted);
}
.link-action-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}
.link-action-btn.discord {
  background: #5865F2;
  color: #fff;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.25);
}
.link-action-btn.discord:hover {
  background: #4752c4;
  box-shadow: 0 6px 16px rgba(88, 101, 242, 0.4);
}
.link-action-btn.twitch {
  background: #9146ff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(145, 70, 255, 0.25);
}
.link-action-btn.twitch:hover {
  background: #772ce8;
  box-shadow: 0 6px 16px rgba(145, 70, 255, 0.4);
}
.link-status-connected {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.error-container {
  max-width: 500px; 
  margin: 80px auto; 
  padding: 40px; 
  text-align: center;
  background: var(--surface); 
  border: 1px solid rgba(255,79,124,0.18);
  border-radius: var(--radius-lg); 
  box-shadow: var(--shadow);
}
.error-container h1 { 
  font-size: 32px; 
  color: var(--danger); 
  margin-bottom: 12px; 
}
.error-container p { 
  color: var(--muted); 
  font-size: 15px; 
  margin-bottom: 24px; 
  line-height: 1.5; 
}
.back-btn {
  display: inline-block; 
  padding: 10px 24px; 
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; 
  font-weight: 700; 
  font-size: 14px;
}

/* 8. Page Specific Styles - Live Stream (liveview.php) */
.live-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 88px);
  width: 100%;
}
.liveview-page body {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 88px;
}
.player-wrapper {
  flex: 1;
  height: 100%;
  background: #000;
}
.chat-wrapper {
  width: 340px;
  height: 100%;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.chat-login-prompt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
}
.twitch-icon-wrapper {
  font-size: 50px;
  margin-bottom: 18px;
  color: #9146ff;
  animation: pulseTwitch 2s infinite ease-in-out;
}
@keyframes pulseTwitch {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(145, 70, 255, 0)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 15px rgba(145, 70, 255, 0.4)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(145, 70, 255, 0)); }
}
.chat-login-prompt h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.chat-login-prompt p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.4;
}

/* 9. Page Specific Styles - Stream VOD (stream.php) */
.theater-container {
  display: flex;
  width: 100%;
  height: calc(85vh - 100px);
  min-height: 480px;
  max-height: 720px;
  background: #000;
  border-bottom: 1px solid var(--border);
}
.theater-container .player-wrapper iframe {
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  border: 0;
}
.theater-container .chat-wrapper iframe {
  width: 100%; 
  height: 100%; 
  border: 0;
}

.details-section {
  padding: 32px 0 64px 0;
  background: linear-gradient(180deg, #0b0715 0%, #06040d 100%);
}
.meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta-pill {
  background: rgba(132, 81, 255, 0.12);
  border: 1px solid rgba(132, 81, 255, 0.2);
  color: var(--primary-2);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
}
.meta-pill.views {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.share-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 4px 6px 4px 12px;
  width: min(380px, 100%);
}
.share-icon { 
  color: var(--faint); 
  font-size: 14px; 
}
.share-input {
  border: 0; 
  background: transparent; 
  color: var(--muted);
  font-family: inherit; 
  font-size: 12.5px; 
  outline: none; 
  flex: 1;
  width: 100%;
}
.share-btn {
  background: var(--primary); 
  color: #fff; 
  font-size: 12px; 
  font-weight: 800;
  padding: 6px 12px; 
  border-radius: 6px; 
  transition: background 0.2s;
}
.share-btn:hover { 
  background: var(--primary-2); 
}
.vod-title {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.watchlist-btn {
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  background: rgba(255, 255, 255, 0.04); 
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm); 
  padding: 8px 16px; 
  color: var(--muted);
  font-size: 13.5px; 
  font-weight: 700; 
  transition: all var(--transition);
}
.watchlist-btn:hover {
  background: rgba(255, 255, 255, 0.08); 
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.watchlist-btn.active {
  background: rgba(255, 74, 146, 0.1); 
  border-color: rgba(255, 74, 146, 0.3);
  color: var(--pink);
  box-shadow: 0 0 15px rgba(255, 74, 146, 0.1);
}
.watchlist-btn.active:hover {
  background: rgba(255, 74, 146, 0.15); 
  border-color: rgba(255, 74, 146, 0.45);
}
.watchlist-btn svg { 
  transition: transform 0.2s ease; 
}
.watchlist-btn:hover svg { 
  transform: scale(1.1); 
}

.grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card-title {
  font-size: 15px; 
  font-weight: 800; 
  text-transform: uppercase;
  letter-spacing: 0.05em; 
  color: var(--faint); 
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
  padding-bottom: 8px;
}
.description-text {
  font-size: 14.5px; 
  line-height: 1.6; 
  color: var(--muted);
  word-break: break-word;
}
.tags-list { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
}
.tag-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}
.tag-badge:hover {
  background: rgba(132, 81, 255, 0.12);
  border-color: rgba(132, 81, 255, 0.25);
  color: var(--primary-2);
}

/* Chapters */
.chapters-grid { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}
.chapter-item {
  display: flex; 
  gap: 14px; 
  align-items: center;
  background: rgba(0, 0, 0, 0.2); 
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px; 
  padding: 8px 12px; 
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.chapter-item:hover {
  border-color: rgba(34, 232, 218, 0.25);
  background: rgba(34, 232, 218, 0.03);
}
.chapter-art {
  width: 42px; 
  height: 56px; 
  border-radius: 6px; 
  object-fit: cover;
  background: #100c1b; 
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.chapter-art-placeholder {
  width: 42px; 
  height: 56px; 
  border-radius: 6px;
  background: linear-gradient(135deg, #18132c, #2b2149);
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 10px; 
  font-weight: 800; 
  color: var(--faint); 
  text-align: center;
}
.chapter-details {
  display: flex; 
  flex-direction: column; 
  gap: 2px;
}
.chapter-name { 
  font-size: 14px; 
  font-weight: 700; 
  color: #fff; 
}
.chapter-timestamp { 
  font-size: 11.5px; 
  color: var(--faint); 
  font-weight: 600; 
}

/* Comments */
.comments-head {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  margin-bottom: 20px;
}
.comments-title { 
  font-size: 18px; 
  font-weight: 800; 
  color: #fff; 
}
.comments-sort {
  background: rgba(0,0,0,0.2); 
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted); 
  padding: 6px 12px; 
  border-radius: 8px; 
  font-size: 13px; 
  font-weight: 600;
}
.comment-prompt-card {
  background: rgba(132, 81, 255, 0.04); 
  border: 1px solid rgba(132, 81, 255, 0.12);
  border-radius: var(--radius-md); 
  padding: 24px; 
  text-align: center; 
  margin-bottom: 24px;
}
.comment-prompt-card p { 
  color: var(--muted); 
  font-size: 14px; 
  margin-bottom: 16px; 
}
.comment-form {
  display: flex; 
  gap: 14px; 
  margin-bottom: 32px;
}
.comment-avatar {
  width: 40px; 
  height: 40px; 
  border-radius: 50%; 
  border: 1.5px solid var(--primary);
  object-fit: cover;
}
.comment-form-body { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
}
.comment-textarea {
  width: 100%; 
  min-height: 80px; 
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255, 255, 255, 0.08); 
  border-radius: 10px;
  padding: 12px; 
  color: #fff; 
  font-family: inherit; 
  font-size: 14px;
  outline: none; 
  resize: vertical; 
  transition: border-color 0.2s;
}
.comment-textarea:focus { 
  border-color: rgba(132,81,255,0.5); 
}
.comment-submit-btn {
  align-self: flex-end; 
  height: 38px; 
  padding: 0 20px; 
  border-radius: 8px;
  font-weight: 800; 
  font-size: 13px; 
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.comments-list { 
  display: flex; 
  flex-direction: column; 
  gap: 16px; 
}
.comment-item {
  display: flex; 
  gap: 14px; 
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04); 
  border-radius: var(--radius-md);
  padding: 16px;
}
.comment-item-avatar { 
  width: 38px; 
  height: 38px; 
  border-radius: 50%; 
  object-fit: cover; 
  border: 1px solid rgba(255,255,255,0.1); 
  transition: transform var(--transition); 
}
.comment-item-avatar:hover { 
  transform: scale(1.06); 
}
.comment-item-body { 
  flex: 1; 
}
.comment-item-header { 
  display: flex; 
  align-items: baseline; 
  gap: 8px; 
  margin-bottom: 6px; 
}
.comment-item-user { 
  font-size: 13.5px; 
  font-weight: 700; 
  color: #fff; 
  display: inline-block; 
}
.comment-item-user:hover { 
  text-decoration: underline; 
  color: var(--primary-2); 
}
.comment-item-date { 
  font-size: 11px; 
  color: var(--faint); 
}
.comment-item-text { 
  font-size: 14px; 
  line-height: 1.5; 
  color: var(--muted); 
  white-space: pre-wrap; 
  word-break: break-word; 
}

/* 10. Page Specific Styles - Admin Area (admin.php) */
.top-bar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  background: rgba(16,12,28,.88);
  margin-bottom: 30px;
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.admin-page body {
  padding-bottom: 80px;
}
.admin-page .brand { 
  font-size: 18px; 
  font-weight: 800; 
  letter-spacing: -0.04em; 
  padding: 0;
  background: linear-gradient(135deg, var(--text), #d3c4ff);
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent;
}

.admin-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 30px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding-bottom: 10px;
}
.profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary);
}
.profile-name h3 { 
  font-size: 16px; 
  font-weight: 700; 
}
.profile-name p { 
  font-size: 13px; 
  color: var(--muted); 
}

/* Admin forms and buttons */
.admin-page .form-control {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all var(--transition);
}
.admin-page .form-control:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(34,232,218,.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  border: 0;
  font-size: 14px;
  transition: all var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
}
.btn-primary:hover {
  box-shadow: 0 0 15px rgba(132,81,255,.4);
  transform: translateY(-1px);
}
.btn-cyan {
  background: var(--cyan);
  color: var(--bg);
}
.btn-cyan:hover {
  box-shadow: 0 0 15px rgba(34,232,218,.4);
  transform: translateY(-1px);
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #ff2e60;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: rgba(255,255,255,.05);
}

.sync-btn-container {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sync-log {
  background: #090612;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: monospace;
  font-size: 12px;
  max-height: 120px;
  overflow-y: auto;
  color: var(--cyan);
  display: none;
}

/* Video table layout */
.video-table-card {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.video-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
  background: var(--surface);
}
.video-table th {
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
}
.video-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  vertical-align: middle;
}
.video-thumb {
  width: 90px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #100c1b;
}
.video-info-cell {
  max-width: 320px;
}
.video-title-text {
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.video-id-text {
  font-size: 12px;
  color: var(--faint);
  font-family: monospace;
}
.badge-index {
  background: rgba(34,232,218,.15);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
}
.search-container {
  margin-bottom: 18px;
}
.admin-page .modal-content {
  width: min(100% - 24px, 500px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  transform: translateY(20px);
  transition: transform 220ms ease;
}
.admin-page .modal.active .modal-content {
  transform: translateY(0);
}
.admin-page .modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding-bottom: 10px;
}
.admin-page .modal-head h3 { 
  font-size: 18px; 
  font-weight: 700; 
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}


/* ==========================================================================
   11. Modern Responsive Layout Adjustments ("Handy-Version")
   ========================================================================== */

/* Header Mobile Transformation */
@media (max-width: 820px) {
  body {
    padding-top: 140px; /* Space for wrapped double-row mobile header */
  }
  body.home-page {
    padding-top: 0;
  }
  body.admin-page {
    padding-top: 0;
  }
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 8px 0;
    background: transparent;
  }
  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
    width: 100%;
  }
  .brand-capsule {
    order: 1;
    padding: 2px 6px;
  }
  .brand {
    font-size: 15px;
    padding: 4px 8px;
  }
  /* Actions (search/notifications) & User Avatar stay top right */
  .header-inner > div:last-child {
    order: 2;
  }
  .action-capsule {
    padding: 4px 6px;
  }
  .user-capsule {
    padding: 4px 6px;
  }
  
  /* Menu Capsule moves to line 2, scrollable horizontal swipe */
  .menu-capsule {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 4px 8px;
    border-radius: 999px;
    gap: 4px;
    /* Hide scrollbars */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .menu-capsule::-webkit-scrollbar {
    display: none;
  }
  .nav-pill {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    flex-shrink: 0;
  }
  
  /* Modal responsive scale */
  .schedule-day {
    grid-template-columns: 1fr;
    gap: 6px;
    text-align: left;
  }
  .day-status {
    text-align: left;
  }
}

/* Small phones header fine-tuning */
@media (max-width: 480px) {
  .brand-capsule {
    padding: 2px 4px;
  }
  .brand {
    font-size: 13.5px;
  }
  .user-info-trigger span {
    display: none !important; /* Hide display name on extra small screens next to avatar */
  }
  .header-search-container.active .header-search-input {
    width: 90px;
  }
}

/* Grid Layouts Responsiveness */
@media (max-width: 1120px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
  .hero-stage {
    min-height: 500px;
  }
}

@media (max-width: 820px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .hero-stage {
    min-height: 420px;
    border-radius: 0 0 20px 20px;
  }
  .hero-card-container {
    bottom: 24px;
    padding: 0 12px;
  }
  .hero-stream-card {
    padding: 16px;
    border-radius: 18px;
    gap: 12px;
  }
  .card-title-text {
    font-size: 1.3rem;
  }
  .card-right-actions {
    width: 100%;
    justify-content: stretch;
  }
  .card-right-actions .card-action-btn {
    flex: 1;
  }
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .hero-stage {
    min-height: 350px;
  }
  .hero-side-nav {
    display: none;
  }
  .hero-thumb {
    width: 42px;
  }
  .hero-nav {
    bottom: 12px;
  }
  .section-head h2 {
    font-size: 1.8rem;
  }
  .section-head a {
    font-size: 16px;
  }
  .stream-meta {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
  .card-tabs-row {
    gap: 4px;
  }
  .card-tab-item {
    font-size: 12px;
    padding: 0 10px;
  }
}

/* Videothek Filter Bar Responsiveness */
@media (max-width: 768px) {
  .filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .search-input-group {
    width: 100%;
  }
  .filter-group {
    width: 100%;
    justify-content: space-between;
  }
  .select-wrapper {
    flex: 1;
  }
  .select-wrapper select {
    width: 100%;
  }
}

/* Profile Responsiveness */
@media (max-width: 768px) {
  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    gap: 16px;
  }
  .profile-name-row {
    justify-content: center;
  }
  .profile-meta-row {
    justify-content: center;
  }
  .section-card {
    padding: 16px;
  }
  .settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .link-action-btn, .link-status-connected {
    width: 100%;
    text-align: center;
  }
}

/* Live View Stacking */
@media (max-width: 900px) {
  .live-container {
    flex-direction: column;
    height: auto;
  }
  .liveview-page body {
    overflow-y: auto;
    height: auto;
  }
  .live-container .player-wrapper {
    aspect-ratio: 16 / 9;
    height: auto;
    flex: none;
  }
  .live-container .chat-wrapper {
    width: 100%;
    height: 500px;
    border-left: 0;
    border-top: 1px solid var(--border);
    flex: none;
  }
}

/* VOD Detail Stacking & Theater Stacking */
@media (max-width: 990px) {
  .theater-container {
    flex-direction: column;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .theater-container .player-wrapper {
    aspect-ratio: 16 / 9;
    height: auto;
    flex: none;
  }
  .theater-container .chat-wrapper {
    width: 100%;
    height: 400px;
    border-left: 0;
    border-top: 1px solid var(--border);
    flex: none;
  }
  .grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .share-container {
    width: 100%;
  }
  .comment-form {
    gap: 10px;
  }
}

/* Admin Grid Stacking */
@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Custom Clean Video Player Styles
   ========================================================================== */

/* Player Wrapper */
.custom-player {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Click Overlay (Play/Pause trigger) */
.player-click-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 50px);
  z-index: 5;
  cursor: pointer;
}

/* Base layout for controls bar */
.player-controls-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(6, 4, 13, 0) 0%, rgba(6, 4, 13, 0.8) 25%, rgba(6, 4, 13, 0.96) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 16px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Auto-hide states */
.custom-player.controls-hidden .player-controls-bar {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}
.custom-player.controls-hidden .player-click-overlay {
  cursor: none;
}

/* Timeline Container & Chapter Labels */
.player-timeline-container {
  position: relative;
  width: 100%;
  padding: 18px 0 8px 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

/* Chapter labels positioned above timeline */
.player-chapters-labels {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 16px;
  display: flex;
  pointer-events: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.player-chapter-label {
  position: absolute;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
  box-sizing: border-box;
  opacity: 0.8;
  transition: color 0.2s, opacity 0.2s;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.player-chapter-label:hover {
  color: var(--cyan);
  opacity: 1;
}

/* Timeline Track */
.player-timeline-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  transition: height 0.15s ease;
}
.player-timeline-container:hover .player-timeline-track {
  height: 6px;
}

/* Timeline progress levels */
.player-timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  border-radius: 2px;
  width: 0%;
  z-index: 2;
}
.player-timeline-hover-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  width: 0%;
  z-index: 1;
  transition: opacity 0.15s ease;
  opacity: 0;
}
.player-timeline-container:hover .player-timeline-hover-progress {
  opacity: 1;
}

/* Timeline Handle / Scrubber Knob */
.player-timeline-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan), 0 0 4px rgba(0,0,0,0.5);
  transform: translate(-50%, -50%) scale(0);
  z-index: 4;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.player-timeline-container:hover .player-timeline-handle {
  transform: translate(-50%, -50%) scale(1);
}

/* Vertical marks between chapters on track */
.player-chapter-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(6, 4, 13, 0.95);
  z-index: 3;
}

/* Control elements row below timeline */
.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.player-controls-left, .player-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Control buttons style */
.player-control-btn {
  background: none;
  border: none;
  color: var(--text);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s, background-color 0.2s;
}
.player-control-btn:hover {
  color: var(--cyan);
  background-color: rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
}
.player-control-btn:active {
  transform: scale(0.95);
}
.player-control-btn svg {
  display: block;
}

/* Time Display badge */
.player-time-badge-capsule {
  background: rgba(13, 9, 24, 0.65);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Volume control container & expanding slider */
.player-volume-container {
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-volume-slider-wrapper {
  width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.player-volume-container:hover .player-volume-slider-wrapper {
  width: 68px;
}
.player-volume-slider-wrapper input[type="range"] {
  -webkit-appearance: none;
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.player-volume-slider-wrapper input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
}
.player-volume-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  margin-top: -3px;
  transition: transform 0.15s ease;
}
.player-volume-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}
.player-volume-percentage {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  width: 32px;
  text-align: left;
}

/* Dropdown Menu Container (Generic) */
.player-dropdown-container {
  position: relative;
}
.player-dropdown-menu {
  position: absolute;
  bottom: 42px;
  left: 0;
  background: rgba(13, 9, 24, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  min-width: 180px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.player-dropdown-menu.player-dropdown-menu-right {
  left: auto;
  right: 0;
}
.player-dropdown-container:focus-within .player-dropdown-menu,
.player-dropdown-menu.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.player-dropdown-header {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--faint);
  font-weight: 800;
  padding: 4px 10px 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
}
.player-dropdown-list {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.player-dropdown-list::-webkit-scrollbar {
  width: 4px;
}
.player-dropdown-list::-webkit-scrollbar-track {
  background: transparent;
}
.player-dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}
.player-dropdown-item {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.15s, color 0.15s;
}
.player-dropdown-item:hover {
  background-color: rgba(132, 81, 255, 0.2);
  color: var(--cyan);
}
.player-dropdown-item.active {
  color: var(--primary-2);
  background-color: rgba(132, 81, 255, 0.12);
}
.player-dropdown-item-timestamp {
  font-size: 11px;
  color: var(--muted);
}

/* Theater Mode style changes */
.custom-player.theater-mode {
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  border-radius: 0;
  border-left: none;
  border-right: none;
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  max-height: 75vh;
}

/* Fullscreen styles */
.custom-player:fullscreen {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  border: none !important;
  border-radius: 0 !important;
}
.custom-player:fullscreen .iframe-container {
  height: 100% !important;
  padding-bottom: 0 !important;
}
.custom-player:fullscreen .player-click-overlay {
  height: calc(100% - 60px) !important;
}
.custom-player:-webkit-full-screen {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  border: none !important;
  border-radius: 0 !important;
}
.custom-player:-webkit-full-screen .iframe-container {
  height: 100% !important;
  padding-bottom: 0 !important;
}
.custom-player:-webkit-full-screen .player-click-overlay {
  height: calc(100% - 60px) !important;
}

/* ==========================================================================
   Cosmetics & Gamification System Styles
   ========================================================================== */

/* Avatar Borders */
.comment-avatar-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 3.5px;
  transition: var(--transition);
  background: transparent;
  position: relative;
}

.comment-avatar-wrapper:not([class*="border_"]) {
  padding: 0;
}

.comment-avatar-wrapper img {
  border: 2px solid var(--bg-2);
}

.border_pink {
  background: linear-gradient(135deg, #ff4a92, #ff7ba9) !important;
  box-shadow: 0 0 10px rgba(255, 74, 146, 0.6) !important;
}

.border_cyan {
  background: linear-gradient(135deg, #22e8da, #5ef7ed) !important;
  box-shadow: 0 0 10px rgba(34, 232, 218, 0.6) !important;
}

.border_gold {
  background: linear-gradient(135deg, #ffe066, #f5b041, #ffe066) !important;
  background-size: 200% auto !important;
  animation: goldShimmer 3s linear infinite !important;
  box-shadow: 0 0 12px rgba(245, 176, 65, 0.7) !important;
}

.border_rainbow {
  background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff, #ff0000) !important;
  background-size: 400% 400% !important;
  animation: rainbowBorder 4s linear infinite !important;
  box-shadow: 0 0 12px rgba(132, 81, 255, 0.5) !important;
}

@keyframes goldShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes rainbowBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Name Colors */
.color_cyan {
  color: #22e8da !important;
  text-shadow: 0 0 8px rgba(34, 232, 218, 0.35);
}

.color_pink {
  color: #ff4a92 !important;
  text-shadow: 0 0 8px rgba(255, 74, 146, 0.35);
}

.color_gold {
  background: linear-gradient(to right, #ffe066, #f5b041);
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-weight: 800;
  display: inline-block;
}

.color_fire {
  background: linear-gradient(to right, #ff3300, #ff9900, #ffcc00, #ff3300);
  background-size: 300% auto;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: fireText 2.5s linear infinite;
  font-weight: 900;
  display: inline-block;
  text-shadow: 0 0 10px rgba(255, 51, 0, 0.2);
}

@keyframes fireText {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.color_matrix {
  color: #00ff00 !important;
  font-weight: 800;
  text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00;
  background: linear-gradient(to bottom, #00ff00, #003300, #00ff00);
  background-size: auto 200%;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: matrixText 2s linear infinite;
  display: inline-block;
}

@keyframes matrixText {
  0% { background-position: 0% 0%; }
  100% { background-position: 0% 200%; }
}

/* Banners (Profile Card Backgrounds) */
.profile-card.banner_cyberpunk {
  background: linear-gradient(135deg, #120c1f 0%, #0d0918 100%),
              radial-gradient(circle at 30% 30%, rgba(255, 74, 146, 0.15) 0%, transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(34, 232, 218, 0.15) 0%, transparent 60%) !important;
  border: 1px solid rgba(255, 74, 146, 0.25) !important;
}
.profile-card.banner_synthwave {
  background: linear-gradient(to bottom, rgba(13, 9, 24, 0.6) 0%, rgba(13, 9, 24, 0.95) 100%),
              linear-gradient(to bottom, #2b1055, #7597de) !important;
  border: 1px solid rgba(117, 151, 222, 0.25) !important;
}
.profile-card.banner_cosmic {
  background: linear-gradient(to bottom, rgba(13, 9, 24, 0.6) 0%, rgba(13, 9, 24, 0.95) 100%),
              linear-gradient(135deg, #090014 0%, #1a0033 50%, #000a1a 100%) !important;
  border: 1px solid rgba(132, 81, 255, 0.25) !important;
}
.profile-card.banner_gold {
  background: linear-gradient(to bottom, rgba(13, 9, 24, 0.6) 0%, rgba(13, 9, 24, 0.95) 100%),
              linear-gradient(135deg, #1a1500 0%, #4d3d00 50%, #1a1500 100%) !important;
  border: 1px solid rgba(245, 176, 65, 0.25) !important;
}
.profile-card.banner_matrix {
  background: linear-gradient(to bottom, rgba(13, 9, 24, 0.7) 0%, rgba(13, 9, 24, 0.95) 100%),
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='200' viewBox='0 0 160 200'%3E%3Cstyle%3E.m%7Bwriting-mode:vertical-rl;text-orientation:upright;fill:%2300ff00;font-family:monospace;font-size:10px;animation:f 4s linear infinite;opacity:0%7D.d1%7Banimation-delay:0s;animation-duration:3s%7D.d2%7Banimation-delay:1s;animation-duration:4s%7D.d3%7Banimation-delay:2s;animation-duration:3.5s%7D.d4%7Banimation-delay:3s;animation-duration:4.5s%7D@keyframes f%7B0%25%7Btransform:translateY(-150px);opacity:0%7D10%25%7Bopacity:0.3%7D90%25%7Bopacity:0.3%7D100%25%7Btransform:translateY(200px);opacity:0%7D%7D%3C/style%3E%3Ctext x='20' y='0' class='m d1'%3E98321045%3C/text%3E%3Ctext x='50' y='0' class='m d3'%3E017429%3C/text%3E%3Ctext x='80' y='0' class='m d2'%3E3820157%3C/text%3E%3Ctext x='110' y='0' class='m d4'%3E502613%3C/text%3E%3Ctext x='140' y='0' class='m d2'%3E4921075%3C/text%3E%3C/svg%3E") !important;
  background-size: 160px 200px !important;
  border: 1px solid rgba(0, 255, 0, 0.2) !important;
}

/* Shop Preview Banners */
#preview-banner-bg.banner_cyberpunk {
  background: linear-gradient(135deg, #120c1f 0%, #050308 100%),
              radial-gradient(circle at 30% 30%, rgba(255, 74, 146, 0.3) 0%, transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(34, 232, 218, 0.3) 0%, transparent 60%) !important;
}
#preview-banner-bg.banner_synthwave {
  background: linear-gradient(to bottom, #2b1055, #7597de) !important;
}
#preview-banner-bg.banner_cosmic {
  background: linear-gradient(135deg, #090014 0%, #1a0033 50%, #000a1a 100%) !important;
}
#preview-banner-bg.banner_gold {
  background: linear-gradient(135deg, #1a1500 0%, #4d3d00 50%, #1a1500 100%) !important;
}
#preview-banner-bg.banner_matrix {
  background-color: #030804 !important;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.9) 100%),
                    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='200' viewBox='0 0 160 200'%3E%3Cstyle%3E.m%7Bwriting-mode:vertical-rl;text-orientation:upright;fill:%2300ff00;font-family:monospace;font-size:10px;animation:f 4s linear infinite;opacity:0%7D.d1%7Banimation-delay:0s;animation-duration:3s%7D.d2%7Banimation-delay:1s;animation-duration:4s%7D.d3%7Banimation-delay:2s;animation-duration:3.5s%7D.d4%7Banimation-delay:3s;animation-duration:4.5s%7D@keyframes f%7B0%25%7Btransform:translateY(-150px);opacity:0%7D10%25%7Bopacity:0.3%7D90%25%7Bopacity:0.3%7D100%25%7Btransform:translateY(200px);opacity:0%7D%7D%3C/style%3E%3Ctext x='20' y='0' class='m d1'%3E98321045%3C/text%3E%3Ctext x='50' y='0' class='m d3'%3E017429%3C/text%3E%3Ctext x='80' y='0' class='m d2'%3E3820157%3C/text%3E%3Ctext x='110' y='0' class='m d4'%3E502613%3C/text%3E%3Ctext x='140' y='0' class='m d2'%3E4921075%3C/text%3E%3C/svg%3E") !important;
  background-size: 160px 200px !important;
}

@keyframes matrixRain {
  from { background-position: 0 0; }
  to { background-position: 0 1000px; }
}

/* Steam-Style Profile Layout & Components */
.section-card {
  background: rgba(21, 16, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.section-title .count {
  font-size: 11px;
  background: rgba(132, 81, 255, 0.2);
  color: var(--primary-2);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(132, 81, 255, 0.15);
}

.placeholder-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Steam Inventory Layout */
.steam-inventory-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .steam-inventory-layout {
    grid-template-columns: 1.4fr 1fr;
  }
}

.steam-inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

@media (min-width: 400px) {
  .steam-inventory-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.inventory-slot {
  aspect-ratio: 1;
  background: rgba(13, 9, 24, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.inventory-slot:not(.empty):hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--primary-2);
  box-shadow: 0 0 10px rgba(169, 108, 255, 0.25);
  transform: scale(1.02);
}

.inventory-slot.empty {
  cursor: default;
  opacity: 0.35;
  background: rgba(0, 0, 0, 0.15);
  border: 1px dashed rgba(255, 255, 255, 0.05);
}

.inventory-slot.equipped {
  border-color: var(--cyan);
  box-shadow: inset 0 0 10px rgba(34, 232, 218, 0.2), 0 0 8px rgba(34, 232, 218, 0.15);
}

.inventory-slot.equipped::after {
  content: "E";
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--cyan);
  color: #000;
  font-size: 8px;
  font-weight: 900;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 4px rgba(34, 232, 218, 0.5);
}

.slot-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.slot-inner span {
  display: inline-block;
  user-select: none;
}

/* Inventory Sidebar Details */
.steam-inventory-details {
  background: rgba(13, 9, 24, 0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 250px;
}

.empty-details-msg {
  text-align: center;
  color: var(--faint);
  font-size: 13.5px;
  padding: 20px;
  line-height: 1.5;
}

.details-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  width: 100%;
}

.details-preview-box {
  width: 100%;
  height: 100px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.details-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.details-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(34, 232, 218, 0.1);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.details-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.details-action-box {
  width: 100%;
  margin-top: 8px;
}

.equip-btn {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 4px 12px rgba(132, 81, 255, 0.3);
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.equip-btn:hover {
  box-shadow: 0 6px 16px rgba(132, 81, 255, 0.5);
  transform: translateY(-1px);
}

.unequip-btn {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  background: rgba(255, 79, 124, 0.1);
  border: 1px solid rgba(255, 79, 124, 0.25);
  color: var(--danger);
  transition: all var(--transition);
  cursor: pointer;
}

.unequip-btn:hover {
  background: rgba(255, 79, 124, 0.15);
  border-color: rgba(255, 79, 124, 0.4);
}

/* Badge Showcase */
.badge-showcase-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.badge-item {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.badge-icon {
  font-size: 20px;
  user-select: none;
}

/* Glowing Medallion Themes for Badges */
.badge-item.badge-pioneer { border-color: rgba(255, 74, 146, 0.4); box-shadow: inset 0 0 6px rgba(255, 74, 146, 0.2); }
.badge-item.badge-pioneer:hover { border-color: #ff4a92; box-shadow: 0 0 10px rgba(255, 74, 146, 0.5); }

.badge-item.badge-commenter { border-color: rgba(34, 232, 218, 0.4); box-shadow: inset 0 0 6px rgba(34, 232, 218, 0.2); }
.badge-item.badge-commenter:hover { border-color: #22e8da; box-shadow: 0 0 10px rgba(34, 232, 218, 0.5); }

.badge-item.badge-collector { border-color: rgba(255, 224, 102, 0.4); box-shadow: inset 0 0 6px rgba(255, 224, 102, 0.2); }
.badge-item.badge-collector:hover { border-color: #ffe066; box-shadow: 0 0 10px rgba(255, 224, 102, 0.5); }

.badge-item.badge-fashion { border-color: rgba(169, 108, 255, 0.4); box-shadow: inset 0 0 6px rgba(169, 108, 255, 0.2); }
.badge-item.badge-fashion:hover { border-color: #a96cff; box-shadow: 0 0 10px rgba(169, 108, 255, 0.5); }

.badge-item.badge-admin { border-color: rgba(255, 79, 124, 0.4); box-shadow: inset 0 0 6px rgba(255, 79, 124, 0.2); }
.badge-item.badge-admin:hover { border-color: #ff4f7c; box-shadow: 0 0 10px rgba(255, 79, 124, 0.5); }

/* Tooltip inside Badge */
.badge-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(13, 9, 24, 0.95);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
  padding: 8px 12px;
  width: 180px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
  box-shadow: var(--shadow);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(13, 9, 24, 0.95) transparent transparent transparent;
}

.badge-item:hover .badge-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.badge-tooltip strong {
  display: block;
  font-size: 13px;
  color: #fff;
  margin-bottom: 2px;
}

.badge-tooltip p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
  margin: 0;
}

@media (min-width: 992px) {
  .steam-profile-container {
    grid-template-columns: 2.3fr 1fr !important;
  }
}

/* Profile Header Card Layout Overhaul (Steam-Style Row) */
.profile-header-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 24px !important;
  padding: 28px !important;
}

.profile-header-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

@media (min-width: 768px) {
  .profile-header-card {
    flex-direction: row !important;
    justify-content: space-between !important;
    text-align: left !important;
    padding: 32px !important;
    gap: 32px !important;
  }
  .profile-header-main {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    flex: 1;
  }
}

/* Premium Level Card */
.profile-level-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 170px;
  align-items: flex-end;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .profile-level-card {
    align-items: center;
    width: 100%;
    margin-top: 8px;
  }
}

.level-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: flex-end;
}

@media (max-width: 767px) {
  .level-badge-row {
    justify-content: center;
  }
}

.level-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.level-badge-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #fff;
  background: var(--surface-2);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  position: relative;
}

.level-num {
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Level circle theme styles */
.level-badge-circle.level-theme-0 { border-color: #8278a7; box-shadow: 0 0 10px rgba(130, 120, 167, 0.5); }
.level-badge-circle.level-theme-10 { border-color: #ff4a92; box-shadow: 0 0 10px rgba(255, 74, 146, 0.5); }
.level-badge-circle.level-theme-20 { border-color: #ffe066; box-shadow: 0 0 10px rgba(255, 224, 102, 0.5); }
.level-badge-circle.level-theme-30 { border-color: #22e88f; box-shadow: 0 0 10px rgba(34, 232, 143, 0.5); }
.level-badge-circle.level-theme-40 { border-color: #22e8da; box-shadow: 0 0 10px rgba(34, 232, 218, 0.5); }
.level-badge-circle.level-theme-50 { border-color: #8451ff; box-shadow: 0 0 10px rgba(132, 81, 255, 0.5); }
.level-badge-circle.level-theme-60 { border-color: #ff00ff; box-shadow: 0 0 10px rgba(255, 0, 255, 0.5); }
.level-badge-circle.level-theme-70 { border-color: #ff3300; box-shadow: 0 0 10px rgba(255, 51, 0, 0.5); }
.level-badge-circle.level-theme-80 { border-color: #00ff00; box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); }
.level-badge-circle.level-theme-90 { border-color: #ffcc00; box-shadow: 0 0 10px rgba(255, 204, 0, 0.5); }

.level-xp-progress-bar-wrapper {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.level-xp-progress-bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 8px rgba(132, 81, 255, 0.5);
  transition: width 0.4s ease;
}

.level-xp-text {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--faint);
}

.level-xp-text .xp-current {
  color: var(--muted);
}

.level-xp-text .xp-total {
  color: var(--faint);
}

/* Premium 2x2 Stats Grid */
.steam-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--primary-2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(169, 108, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.stat-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.stat-val {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* Sleek Connecting-Line Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color 0.22s;
}

.timeline-item:hover {
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.01);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2.5px solid var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  transition: transform 0.22s;
  z-index: 2;
}

.timeline-item:hover::before {
  transform: scale(1.2);
}

/* Refactored Connection Blocks */
.connection-block {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition);
}

.connection-block:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.01);
}

.connection-block.twitch {
  border-left: 3px solid #6441a5;
}

.connection-block.discord {
  border-left: 3px solid #5865F2;
}

.connection-block.connected {
  background: rgba(34, 232, 143, 0.02);
}

.connection-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.connection-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
}

.connection-desc {
  font-size: 11px;
  color: var(--faint);
}

.connection-block .link-status-connected {
  color: var(--success);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}

.connection-block .link-action-btn {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition);
  color: #fff;
}

.connection-block .twitch-btn {
  background: #6441a5;
  box-shadow: 0 4px 10px rgba(100, 65, 165, 0.2);
}

.connection-block .twitch-btn:hover {
  background: #7550bb;
  box-shadow: 0 4px 12px rgba(100, 65, 165, 0.4);
  transform: translateY(-1px);
}

.connection-block .discord-btn {
  background: #5865F2;
  box-shadow: 0 4px 10px rgba(88, 101, 242, 0.2);
}

.connection-block .discord-btn:hover {
  background: #6976f3;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
  transform: translateY(-1px);
}

/* Watchlist Hover zoom & Play buttons */
.video-card .thumb-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.video-card .thumb-wrapper::after {
  content: "▶";
  position: absolute;
  inset: 0;
  background: rgba(13, 9, 24, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: scale(0.8);
  pointer-events: none;
}

.video-card:hover .thumb-wrapper::after {
  opacity: 1;
  transform: scale(1);
}

.video-card .thumb-img {
  transition: transform 0.3s ease;
}

.video-card:hover .thumb-img {
  transform: scale(1.05);
}

