/* Base theme variables - Coastal inspired: navy blues, ambers, golds */
:root {
  --primary-bg: #f8f9ff; /* Light blue-gray for light theme bg */
  --dark-bg: #0f1419; /* Dark navy for dark theme bg */
  --text-primary: #2c3e50; /* Dark blue-gray text */
  --text-light: #ecf0f1; /* Light text for dark theme */
  --accent-gold: #f39c12; /* Amber/gold accent */
  --accent-blue: #3498db; /* Ocean blue */
  --border-color: #bdc3c7; /* Subtle gray border */
  --hover-bg: #ecf0f1; /* Light hover */
  --dark-hover: #34495e; /* Dark hover */
  --shadow: 0 4px 6px rgba(0,0,0,0.1);
  --gradient-hero: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* Light theme */
.light-theme {
  --bg-primary: var(--primary-bg);
  --text-primary-color: var(--text-primary);
  --border: var(--border-color);
  --hover: var(--hover-bg);
}

/* Dark theme */
.dark-theme {
  --bg-primary: var(--dark-bg);
  --text-primary-color: var(--text-light);
  --border: #34495e;
  --hover: var(--dark-hover);
}

/* Light theme classes */
.light-theme {
  --primary-color: var(--light-bg-color);
  --secondary-color: var(--light-font-color);
  --border-color: #dee2e6;
  --hover-color: #e9ecef;
}

/* Dark theme classes */
.dark-theme {
  --primary-color: var(--dark-bg-color);
  --secondary-color: var(--dark-font-color);
  --border-color: #495057;
  --hover-color: #343a40;
}

/* Import Google Fonts for better typography */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@300;400&display=swap');

/* Base styles */
body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
  background-color: var(--bg-primary);
  color: var(--text-primary-color);
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

/* Header and navigation */
header {
  background: var(--bg-primary);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

h1 {
  margin: 0;
  color: var(--accent-gold);
  font-size: 2.8rem;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
}

nav a {
  text-decoration: none;
  color: var(--text-primary-color);
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

nav a:hover {
  background: var(--accent-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Theme switching container */
.theme-switcher {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.theme-switcher button {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--accent-gold);
  background: none;
  color: var(--accent-gold);
  cursor: pointer;
  font-weight: 600;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.theme-switcher button:hover {
  background-color: var(--accent-gold);
  color: white;
  transform: scale(1.05);
}

/* Main content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.page h2 {
  color: var(--accent-gold);
  margin-bottom: 2rem;
  text-align: center;
  font-size: 2.2rem;
}

/* Hero section styles */
.hero-section {
  background: var(--gradient-hero);
  color: white;
  text-align: center;
  padding: 4rem 2rem;
  margin-bottom: 3rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10"><defs><pattern id="wave" x="0" y="0" width="100" height="10" patternUnits="userSpaceOnUse"><path d="M-40 9 Q-30 7 -20 9 T0 9 T20 9 T40 9" stroke="none" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="10" fill="url(%23wave)"/></svg>');
  opacity: 0.3;
}

.hero-title {
  font-size: 3.5rem;
  margin: 0 0 1rem 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.3rem;
  margin: 0 0 2rem 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  background: var(--accent-gold);
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.cta-button:hover {
  background: #e67e22;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* Project brief sections */
.project-brief {
  display: grid;
  gap: 2rem;
}

.brief-section {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.brief-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.brief-section h3 {
  color: var(--accent-gold);
  border-bottom: 2px solid var(--accent-blue);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Table styles for characters and locations */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-family: 'Roboto', sans-serif;
}

thead th {
  background: var(--accent-blue);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

tbody tr:nth-child(even) {
  background: #f8f9ff;
}

tbody tr:hover {
  background: var(--hover);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

/* Gallery styles */
.gallery-category {
  background: var(--bg-primary);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.gallery-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-category h4 {
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

/* Copyright footer */
.copyright-footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  color: var(--text-primary-color);
  font-size: 0.9rem;
  margin-top: 3rem;
}

.copyright-footer p {
  margin: 0;
  opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  
  h1 {
    font-size: 2.2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .brief-section {
    padding: 1.5rem;
  }

  table {
    font-size: 0.9rem;
  }

  td, th {
    padding: 0.8rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 3rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }
}

/* Iframe styling */
iframe {
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 800px;
  height: 500px;
}

/* Script content enhancements */
#script-content {
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
}

#script-content h3 {
  color: var(--accent-gold);
  margin-top: 2rem;
}

#script-content ul, #script-content ol {
  padding-left: 2rem;
}

#script-content li {
  margin-bottom: 0.5rem;
}