:root {
  --bg: #0f0a08;
  --fg: #fdf3e7;
  --emerald-100: rgba(253, 224, 191, 0.85);
  --emerald-300: #f2b155;
  --emerald-500: #d97706;
  --emerald-600: #b45309;
  --emerald-900: rgba(146, 64, 14, 0.4);
  --neutral-900: #1c140f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--emerald-900);
  background: rgba(15, 10, 8, 0.9);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--emerald-100);
}

.site-header nav a:hover {
  color: var(--emerald-300);
}

.btn {
  display: inline-block;
  border-radius: 9999px;
  background: var(--emerald-600);
  color: white;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--emerald-500);
}

.btn-sm {
  padding: 0.5rem 1rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero,
.gallery,
.upload-page,
.watch-page,
.not-found {
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.upload-page {
  max-width: 36rem;
}

.watch-page {
  max-width: 48rem;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23c2703d' fill-opacity='0.5'%3E%3Cellipse cx='40' cy='52' rx='16' ry='13'/%3E%3Cellipse cx='18' cy='30' rx='8' ry='10' transform='rotate(-25 18 30)'/%3E%3Cellipse cx='32' cy='18' rx='8' ry='10'/%3E%3Cellipse cx='48' cy='18' rx='8' ry='10'/%3E%3Cellipse cx='62' cy='30' rx='8' ry='10' transform='rotate(25 62 30)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
  opacity: 0.5;
  pointer-events: none;
}

.hero h1,
.hero p,
.hero .btn {
  position: relative;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.hero p {
  max-width: 42rem;
  color: var(--emerald-100);
  margin: 0 0 1rem;
}

.empty-state {
  border: 1px dashed var(--emerald-900);
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  color: var(--emerald-100);
}

.empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg);
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--emerald-900);
  background: var(--neutral-900);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.video-card:hover {
  border-color: rgba(217, 119, 6, 0.6);
  box-shadow: 0 10px 25px rgba(146, 64, 14, 0.35);
}

.video-card-media {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: black;
}

.video-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
}

.video-card-body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.video-card:hover h3 {
  color: var(--emerald-300);
}

.badge {
  width: fit-content;
  border-radius: 9999px;
  background: var(--emerald-900);
  color: var(--emerald-300);
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.meta {
  margin-top: auto;
  font-size: 0.75rem;
  color: rgba(209, 250, 229, 0.5);
}

.card {
  margin-top: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--emerald-900);
  background: rgba(23, 23, 23, 0.6);
  padding: 1.5rem;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--emerald-100);
}

.optional {
  color: rgba(209, 250, 229, 0.4);
}

.form-field input,
.form-field textarea {
  border-radius: 0.5rem;
  border: 1px solid var(--emerald-900);
  background: var(--neutral-900);
  color: var(--fg);
  padding: 0.625rem;
  font-size: 0.875rem;
  font-family: inherit;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(209, 250, 229, 0.3);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--emerald-500);
}

.alert-error {
  border-radius: 0.5rem;
  background: rgba(69, 10, 10, 0.6);
  color: #fca5a5;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  margin: 0 0 1rem;
}

.back-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--emerald-300);
}

.back-link:hover {
  color: #f8d9ae;
}

.alert-success {
  border-radius: 0.5rem;
  background: rgba(146, 64, 14, 0.35);
  color: #f8d9ae;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  margin: 0 0 1rem;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--emerald-900);
}

.admin-row:last-child {
  border-bottom: none;
}

.admin-row-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--emerald-900);
}

.badge-pending {
  background: rgba(87, 83, 78, 0.4);
  color: #d6d3d1;
}

.badge-approved {
  background: var(--emerald-900);
  color: var(--emerald-300);
}

.badge-rejected {
  background: rgba(69, 10, 10, 0.6);
  color: #fca5a5;
}

.watch-video {
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--emerald-900);
  background: black;
}

.watch-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.watch-meta {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.watch-meta h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.description {
  white-space: pre-wrap;
  color: var(--emerald-100);
}

.site-footer {
  border-top: 1px solid var(--emerald-900);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(209, 250, 229, 0.5);
}
