/* New Vision Film Foundation — Stylesheet */
/* Theme variables + spacing grid */

:root {
  /* Spacing grid (4px base) */
  --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;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Status colors (same across both themes) */
  --status-new: #4a9eff;
  --status-review: #f59e0b;
  --status-shortlist: #10b981;
  --status-passed: #6b7280;

  /* Score colors (same across both themes) */
  --score-high: #10b981;
  --score-mid: #f59e0b;
  --score-low: #ef4444;
}

/* Dark theme (default) */
:root,
[data-theme="dark"] {
  /* Colors */
  --bg-primary: #0f1419;
  --bg-secondary: #1a1f29;
  --bg-tertiary: #252b38;
  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted: #6b7280;
  --accent-gold: #d4a843;
  --accent-gold-hover: #e5b854;
  --border-subtle: #313640;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* Light theme */
[data-theme="light"] {
  /* Colors */
  --bg-primary: #f5f0eb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #ede8e2;
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  --accent-gold: #b87333;
  --accent-gold-hover: #a06328;
  --border-subtle: #d9d3cc;

  /* Shadows (lighter for light backgrounds) */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.16);
}

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

body {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-6) 0;
  margin-bottom: var(--space-8);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.header-logo-link {
  display: block;
  text-decoration: none;
  line-height: 0;
  color: var(--accent-gold);
}

.header-logo-link svg {
  height: 48px;
  width: auto;
  display: block;
}

/* Light mode SVG color overrides for dark fills */
[data-theme="light"] .header-logo-link svg rect[fill="#0f1419"] {
  fill: #f5f0eb;
}

[data-theme="light"] .header-logo-link svg circle[fill="#0f1419"] {
  fill: #f5f0eb;
}

.header-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.theme-toggle {
  font-size: 20px;
  padding: var(--space-2) var(--space-3);
  line-height: 1;
  transition: transform 0.2s;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Navigation */
.nav-links {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.nav-link {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-12);
}

.narrow-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-12);
}

/* Buttons */
button, .btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--accent-gold);
  color: #0f1419;
}

.btn-primary:hover {
  background: var(--accent-gold-hover);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #2d3442;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-4);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-6);
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

input[type="file"] {
  font-size: 14px;
  color: var(--text-secondary);
}

input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 14px;
  padding: var(--space-2) var(--space-4);
  margin-right: var(--space-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: #2d3442;
}

/* Release agreement text box */
.release-text {
  max-height: 150px;
  overflow-y: auto;
  padding: var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  margin-bottom: var(--space-4);
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

/* Home Page Grid Layout */
.home-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-6);
  align-items: stretch;
  height: min(420px, calc(100vh - 180px));
}

.home-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
  justify-content: center;
  overflow: hidden;
}

.home-content .hero-logo {
  width: 150px;
  height: auto;
  margin: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.home-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 0;
  letter-spacing: 0.02em;
}

.home-tagline {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.home-content .hero-mission {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

.home-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
  margin-bottom: var(--space-8);
  text-align: center;
  padding: var(--space-8) 0;
}

.hero-logo {
  width: 200px;
  height: auto;
  margin: 0 auto var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.hero-mission {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.hero-image {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-8);
  border: 1px solid var(--border-subtle);
}

.hero-context {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: 0;
  text-align: left;
}

.hero-context h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: var(--space-3);
}

.hero-context p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Public Submission Page */

/* Two-column layout for landing page */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: start;
}

.branding-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.intro {
  margin-bottom: var(--space-6);
  text-align: center;
}

.intro h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.intro p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.submission-form {
  margin-top: 0;
}

.form-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.form-actions button {
  flex: 1;
}

/* Confirmation Message */
.confirmation {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.confirmation-icon {
  font-size: 64px;
  margin-bottom: var(--space-6);
}

.confirmation h2 {
  font-size: 28px;
  margin-bottom: var(--space-4);
  color: var(--accent-gold);
}

.confirmation p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

/* Login Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-6);
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal h2 {
  margin-bottom: var(--space-6);
  text-align: center;
  color: var(--accent-gold);
}

.modal .form-actions {
  margin-top: var(--space-6);
}

/* About Us Page */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.about-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: var(--space-4);
}

.about-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
}

.about-content ul li {
  position: relative;
  padding-left: var(--space-6);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.about-content ul li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-weight: bold;
}

/* Board Page */
.about-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.about-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: var(--space-4);
}

.about-intro {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.board-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.board-photos {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
}

.board-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-gold);
  box-shadow: var(--shadow-md);
}

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

.board-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: var(--space-3);
}

.board-bio {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
}

.dashboard-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  color: var(--text-primary);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar select {
  width: auto;
  min-width: 180px;
}

.filter-bar label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
}

.filter-bar input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

/* Script List */
.script-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.script-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
}

.script-card:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
}

.script-card-main {
  flex: 1;
  min-width: 0;
}

.script-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
}

.script-card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-card-meta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-secondary);
}

.script-card-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.script-card-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Badges */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-new {
  background: var(--status-new);
  color: white;
}

.badge-review {
  background: var(--status-review);
  color: white;
}

.badge-shortlist {
  background: var(--status-shortlist);
  color: white;
}

.badge-passed {
  background: var(--status-passed);
  color: white;
}

.score-badge {
  font-size: 20px;
  font-weight: 700;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  min-width: 60px;
  text-align: center;
}

.score-high {
  background: var(--score-high);
  color: white;
}

.score-mid {
  background: var(--score-mid);
  color: white;
}

.score-low {
  background: var(--score-low);
  color: white;
}

/* Script Detail */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
}

.detail-header h2 {
  font-size: 28px;
  color: var(--text-primary);
}

.detail-content {
  display: grid;
  gap: var(--space-6);
}

.detail-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.detail-section h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  margin-bottom: var(--space-4);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.metadata-item .label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.metadata-item .value {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
}

.score-grid {
  display: grid;
  gap: var(--space-4);
}

.score-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.score-item .label {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
}

.score-bar {
  flex: 2;
  height: 24px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 0.3s;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--space-2);
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.score-bar-fill.high {
  background: var(--score-high);
}

.score-bar-fill.mid {
  background: var(--score-mid);
}

.score-bar-fill.low {
  background: var(--score-low);
}

.overall-score {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.overall-score .score-badge {
  font-size: 48px;
  padding: var(--space-4) var(--space-6);
}

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.list li {
  padding-left: var(--space-6);
  position: relative;
}

.list li:before {
  content: "•";
  position: absolute;
  left: var(--space-3);
  color: var(--accent-gold);
  font-weight: bold;
}

.synopsis {
  line-height: 1.8;
  color: var(--text-secondary);
}

.synopsis p {
  margin-bottom: var(--space-4);
}

.synopsis p:last-child {
  margin-bottom: 0;
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  gap: var(--space-6);
}

.spinner {
  width: 64px;
  height: 64px;
  border: 4px solid var(--bg-tertiary);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 18px;
  color: var(--text-primary);
  text-align: center;
  max-width: 400px;
}

.loading-subtext {
  font-size: 14px;
  color: var(--text-muted);
}

/* Error Messages */
.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--score-low);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  color: var(--score-low);
  font-size: 14px;
  margin-bottom: var(--space-4);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

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

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

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: var(--space-4);
    align-items: flex-start;
  }

  .brand h1 {
    font-size: 22px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  /* Stack two-column layout on mobile */
  .two-column-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  /* Stack home grid on mobile */
  .home-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .home-content .hero-logo {
    width: 120px;
  }

  .home-content h2 {
    font-size: 24px;
  }

  .hero h2 {
    font-size: 24px;
  }

  .hero-logo {
    width: 150px;
  }

  .about-header h2 {
    font-size: 24px;
  }

  .board-grid {
    grid-template-columns: 1fr;
  }

  .board-photos {
    flex-wrap: wrap;
  }

  .script-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .script-card-right {
    width: 100%;
    justify-content: space-between;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar select {
    width: 100%;
  }

  .metadata-grid {
    grid-template-columns: 1fr;
  }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
}
