/* CSS Variables for FigosPlay (Fig aesthetic) */
:root {
  --bg-color: #120A16;
  --text-main: #FFFFFF;
  --text-muted: #B3A4BA;
  --primary-color: #8B2F8A;
  --primary-hover: #AA3EAA;
  --border-color: #382440;
  --surface-color: #1E1224;
  --danger-color: #D03B43;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.8);
  --font-family: 'Netflix Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-bg: rgba(18, 10, 22, 0.95);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--text-muted);
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.5em;
  color: var(--text-main);
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4%;
}

/* Header/Nav */
.site-header {
  background: var(--header-bg);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 1px;
}

.brand:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.875rem;
}

.nav-links a:hover {
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #fff;
}

.btn-outline {
  background-color: rgba(109, 109, 110, 0.7);
  color: white;
}

.btn-outline:hover {
  background-color: rgba(109, 109, 110, 0.4);
  color: white;
}

.btn-danger {
  background-color: transparent;
  color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-danger:hover {
  background-color: rgba(229, 9, 20, 0.1);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
  outline: 0;
  border-color: var(--text-main);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Cards (for courses, modules) */
.card {
  background: var(--surface-color);
  border: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.card:hover {
  transform: scale(1.05);
  /* Netflix-like scale */
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Card images */
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

/* Utility */
.mb-4 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

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

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.gap-4 {
  gap: 1rem;
}

.alert {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-error {
  background-color: #E87C03;
  /* Netflix warning orange */
  color: white;
}

.alert-success {
  background-color: #2b9d3b;
  /* Netflix greenish */
  color: white;
}

/* Grid logic for catalog */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Login Box */
.login-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  width: 100%;
  max-width: 450px;
  background: rgba(0, 0, 0, 0.75);
  padding: 3rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

/* Tables for Admin */
.table-wrapper {
  overflow-x: auto;
  background: var(--surface-color);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

table th {
  background-color: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Video Player Hero */
.video-hero {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Lesson Listing Module */
.module-list {
  background: var(--surface-color);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.module-header {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border-color);
  font-weight: bold;
  font-size: 1.1rem;
}

.lesson-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.lesson-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.lesson-item:last-child {
  border-bottom: none;
}