/* SOSTube Design System - Dark Ocean & Glassmorphism */
:root {
  --bg-main: #070b14;
  --bg-surface: #0e1626;
  --bg-card: rgba(18, 28, 48, 0.7);
  --bg-glass: rgba(14, 22, 38, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(14, 165, 233, 0.4);
  --accent-cyan: #00f0ff;
  --accent-blue: #0284c7;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.15);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header & Navbar */
header.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand img.logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  object-fit: cover;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #070b14;
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: var(--accent-cyan);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 4rem 2rem 3rem;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.4) 0%, var(--bg-main) 100%),
              url('../img/hero-banner.jpg') center/cover no-repeat;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(0, 240, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--accent-cyan);
  margin-bottom: 1rem;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.4);
  object-fit: cover;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 60%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 720px;
  margin: 0 auto 1.75rem;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-chip {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Search and Controls */
.controls-container {
  max-width: 1200px;
  margin: 2rem auto 1.5rem;
  padding: 0 1.5rem;
  width: 100%;
}

.search-bar-wrapper {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-input-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-input-box input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 2.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-input-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.sort-select {
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.filter-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.tag-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.825rem;
  cursor: pointer;
  transition: var(--transition);
}

.tag-btn:hover, .tag-btn.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

.search-feedback {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Video Grid */
.grid-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  width: 100%;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-card);
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.7), var(--shadow-glow);
}

.card-thumb-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #020617;
  overflow: hidden;
}

.card-thumb-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .card-thumb-wrapper img {
  transform: scale(1.05);
}

.card-badge-duration {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.card-badge-hd {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(2, 132, 199, 0.85);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-date {
  font-size: 0.775rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.card-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0.45rem 0.6rem;
}

/* Video Player Page */
.player-page-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

@media (max-width: 900px) {
  .player-page-container {
    grid-template-columns: 1fr;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-cyan);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.back-link:hover {
  transform: translateX(-4px);
}

.main-video-wrapper {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-subtle);
}

.main-video-wrapper video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.video-toolbar {
  padding: 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.res-switcher {
  display: flex;
  gap: 0.5rem;
}

.res-switcher button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.res-switcher button.active {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
}

.player-details {
  background: var(--bg-surface);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
  border: 1px solid var(--border-subtle);
}

.player-details h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.player-meta-bar {
  display: flex;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.audio-player-box {
  background: var(--bg-card);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.audio-player-box audio {
  width: 100%;
  margin-top: 0.5rem;
}

.download-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.desc-box {
  background: rgba(0, 0, 0, 0.25);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  white-space: pre-wrap;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Sidebar Up Next */
.sidebar-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-card {
  display: flex;
  gap: 0.75rem;
  background: var(--bg-surface);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.sidebar-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.sidebar-thumb {
  width: 110px;
  height: 62px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-info span {
  font-size: 0.725rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Footer */
footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

footer a {
  color: var(--accent-cyan);
}
