/* ScriptGEN Production Script Generator - Professional Film Studio Edition */
:root {
  --primary-color: #e50914; /* ScriptGEN red */
  --secondary-color: #221f1f; /* ScriptGEN dark */
  --accent-color: #f5f5f1; /* ScriptGEN light */
  --dark-color: #000000;
  --light-color: #ffffff;
  --gray-color: #8c8c8c;
  --border-color: #404040;
  --success-color: #1ed760; /* Spotify green for success */
  --danger-color: #e85d04;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  --premium-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --font-heading: "Bebas Neue", "Montserrat", sans-serif;
  --font-body: "IBM Plex Sans", "Open Sans", sans-serif;
  --gradient-bg: linear-gradient(145deg, #221f1f, #171717);
}

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

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--light-color);
  background-color: var(--secondary-color);
  background-image: var(--gradient-bg);
  min-height: 100vh;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 1rem;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
}

header h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

footer {
  text-align: center;
  margin-top: 3rem;
  padding: 1rem;
  color: var(--gray-color);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Styles */
.card {
  background: rgba(20, 20, 20, 0.95);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--premium-shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

textarea,
input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--light-color);
  transition: all 0.3s ease;
}

textarea {
  height: 140px;
  resize: vertical;
}

textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.3);
  background-color: rgba(0, 0, 0, 0.7);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--dark-color);
  color: var(--light-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s;
  letter-spacing: 0.5px;
}

.btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn.primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.btn.primary:hover {
  background-color: #f40612;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(229, 9, 20, 0.4);
}

.btn.secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn.secondary:hover {
  background-color: #218838;
}

.btn.small {
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
}

.btn.icon {
  padding: 0.25rem 0.5rem;
  background: none;
  font-size: 1.2rem;
}

/* Editor Styles */
.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.title-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ScriptGEN-pill {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.btn-icon {
  margin-right: 0.5rem;
  font-size: 1.1em;
}

.download-group {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.editor-actions {
  display: flex;
  gap: 0.5rem;
}

.editor-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .editor-content {
    grid-template-columns: 1fr 1fr;
  }

  .editor-card:first-child {
    grid-column: 1 / -1;
  }
}

.field {
  margin-bottom: 1rem;
}

.field .label {
  font-weight: 600;
  color: var(--accent-color);
}

/* Character Cards */
.character-card,
.scene-card {
  background-color: rgba(20, 20, 20, 0.9);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.character-card:hover,
.scene-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--premium-shadow);
  border-left-width: 6px;
}

.scene-card {
  border-left-color: var(--accent-color);
  position: relative;
}

.scene-card::after {
  content: "";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
  opacity: 0.8;
}

.character-header,
.scene-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.character-name,
.scene-slug {
  font-weight: 600;
  font-size: 1.1rem;
}

.card-actions {
  display: flex;
  gap: 0.3rem;
}

/* Modal Styles */
#modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  z-index: 1100;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-content {
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

/* ScriptGEN-style Loading overlay */
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loader {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 2rem;
}

.loader:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #e50914, #ff6b81);
  border-radius: 3px;
  animation: ScriptGENLoader 1.5s linear infinite;
}

@keyframes ScriptGENLoader {
  0% {
    transform: rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: rotate(180deg);
    opacity: 0.5;
  }
  100% {
    transform: rotate(360deg);
    opacity: 1;
  }
}

#loadingOverlay p {
  color: white;
  font-size: 1.1rem;
  text-align: center;
  max-width: 80%;
  margin-top: 1rem;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#loadingOverlay .loading-subtitle {
  font-size: 0.9rem;
  color: var(--accent-color);
  margin-top: 0.5rem;
  opacity: 0.8;
}

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

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.text-center {
  text-align: center;
}

/* Manuscript Generation UI */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Manuscript options */
.manuscript-options {
  margin-top: 10px;
  padding: 10px;
  background-color: var(--light-color);
  border-radius: 5px;
  border-left: 3px solid var(--gray-color);
}

.checkbox-container {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.checkbox-container input[type="checkbox"] {
  margin-right: 10px;
}

/* Progress bar styles */
/* ScriptGEN-style UI components */
.ScriptGEN-container {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ScriptGEN-logo-container {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ScriptGEN-logo {
  font-family: "Bebas Neue", sans-serif;
  display: inline-block;
  color: var(--primary-color);
  font-size: 4rem;
  font-weight: bold;
  text-shadow: 2px 2px 10px rgba(229, 9, 20, 0.6);
  padding: 0.5rem 1rem;
  letter-spacing: 0.05em;
}

.ScriptGEN-progress-container {
  margin: 2rem 0;
}

.progress-label {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #e50914, #ff6b81);
  width: 0;
  transition: width 0.5s ease;
}

.progress-text {
  color: var(--accent-color);
  font-size: 0.9rem;
}

.status-card {
  background-color: rgba(0, 0, 0, 0.5);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  border-radius: 4px;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
}

.status-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-color);
  margin-right: 1rem;
  box-shadow: 0 0 8px rgba(229, 9, 20, 0.8);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(229, 9, 20, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 9, 20, 0);
  }
}

.status-highlight {
  color: var(--primary-color);
  font-weight: bold;
}

.production-description {
  line-height: 1.8;
  color: var(--accent-color);
  margin: 1.5rem 0;
}

.ScriptGEN-note {
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 1rem;
  margin-top: 2rem;
  display: flex;
  align-items: center;
}

.note-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
}

.note {
  margin: 0;
  color: var(--accent-color);
  font-size: 0.9rem;
}

.status-section {
  background-color: var(--light-color);
  padding: 10px 15px;
  border-radius: 5px;
  margin: 15px 0;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 5px;
  margin: 15px 0;
  border-left: 4px solid var(--danger-color);
}

.note {
  font-size: 0.9em;
  color: var(--gray-color);
  font-style: italic;
  margin-top: 5px;
}
