:root {
  --bg-color: #0f0c29;
  --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  --primary-color: #00d2ff;
  --secondary-color: #928dab;
  --accent-color: #ff0099;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #ffffff;
  --text-muted: #b3b3b3;
  --font-main: 'Inter', sans-serif;
  --radius-lg: 16px;
  --radius-md: 8px;
  --shadow-lg: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
}

/* Layout */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  font-size: 3rem;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.header p {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* Glassmorphism Utility */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px;
}

/* New Grid Layout */
.prompt-form-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.section-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #ffffff;
  /* White color for titles */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
}

.section-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-field select {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #222;
  /* Dark background */
  color: #fff;
  /* White text */
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.form-field select:focus {
  border-color: var(--primary-color);
  background: #2a2a2a;
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

.form-field select option {
  background: #222;
  /* Dark background for options */
  color: #fff;
  padding: 10px;
}

/* Style Section Specifics */
.style-section {
  display: flex;
  flex-direction: column;
}

.style-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 100%;
}

.style-left-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.style-right-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 768px) {
  .style-content-grid {
    grid-template-columns: 1fr;
  }
}

.style-selector-container {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.style-selector {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #222;
  color: #fff;
  cursor: pointer;
  outline: none;
}

.style-preview {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.preview-box {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.preview-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.0);
  /* backdrop-filter: blur(2px); */
  z-index: 1;
}

.preview-label {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Generate Section */
.generate-section {
  text-align: center;
  margin-top: 2rem;
  padding-bottom: 4rem;
}

.generate-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 1rem 3rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.6);
}

.generate-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.generate-hint {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Results Styles */
.results-display {
  margin-top: 40px;
  animation: fadeIn 0.5s ease-out;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.reset-btn {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all 0.3s;
}

.reset-btn:hover {
  background: var(--primary-color);
  color: #000;
}

.prompts-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prompt-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform 0.2s;
}

.prompt-card:hover {
  transform: translateX(5px);
  border-color: var(--primary-color);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.prompt-label {
  font-size: 0.8rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.copy-btn {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.copy-btn:hover {
  color: var(--text-main);
}

.copy-btn.copied {
  color: var(--primary-color);
}

.prompt-text {
  line-height: 1.6;
  font-size: 1.05rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .grid-container {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .style-section {
    grid-column: span 2;
  }
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 60px;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--glass-border);
}

/* Custom Textarea */
.custom-textarea {
  width: 100%;
  padding: 1rem;
  font-size: 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #222;
  color: #fff;
  outline: none;
  resize: vertical;
  font-family: inherit;
  transition: all 0.3s ease;
}

.custom-textarea:focus {
  border-color: var(--primary-color);
  background: #2a2a2a;
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

/* Key Takeaways (SXO) */
.key-takeaways {
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
}

.key-takeaways h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.key-takeaways ul {
  list-style-type: none;
  padding-left: 0;
}

.key-takeaways li {
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.key-takeaways strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Image Carousel */
.carousel-section {
  margin-top: 4rem;
  margin-bottom: 2rem;
  text-align: center;
}

.carousel-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.carousel-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  padding: 0;
  /* Override glass-panel padding */
  aspect-ratio: 16/9;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.indicator.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
}
