/* ==================== ROOT & VARIABLES ==================== */
:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --secondary: #06b6d4;
  --accent: #ec4899;
  --background: #0f172a;
  --surface: #1e293b;
  --surface-light: #334155;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --border: rgba(139, 92, 246, 0.2);
  --gradient: linear-gradient(135deg, #8b5cf6, #06b6d4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==================== HEADER ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .header-content {
    justify-content: space-between;
  }
}

/* ==================== BUTTONS ==================== */
.btn-primary {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.6);
}

.btn-primary.large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.btn-secondary.large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-generate {
  width: 100%;
  background: var(--gradient);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.btn-generate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.6);
}

.btn-generate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-download,
.btn-share {
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-download:hover,
.btn-share:hover {
  background: rgba(139, 92, 246, 0.3);
}

/* ==================== GLASS MORPHISM ==================== */
.glass {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

/* ==================== GRADIENT TEXT ==================== */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  bottom: 10%;
  right: 10%;
  animation-delay: 3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(30px);
  }
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  z-index: 10;
  position: relative;
}

.badge {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.stat-card {
  padding: 1.5rem;
  border-radius: 1rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .blob {
    width: 250px !important;
    height: 250px !important;
  }
}

/* ==================== FEATURES SECTION ==================== */
.features {
  position: relative;
  padding: 5rem 2rem;
  background: var(--background);
}

.section-header {
  max-width: 1280px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-header h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  border-radius: 1rem;
  transition: all 0.3s;
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==================== GALLERY SECTION ==================== */
.gallery {
  padding: 5rem 2rem;
  background: linear-gradient(to bottom, var(--background), rgba(30, 41, 59, 0.5));
}

.gallery-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.gallery-card {
  border-radius: 1.5rem;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border);
  transition: all 0.3s;
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.card-image {
  height: 250px;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s;
}

.gallery-card:hover .card-image {
  transform: scale(1.1);
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Large Gallery Cards */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.gallery-card-large {
  grid-column: span 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 1.5rem;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border);
  transition: all 0.3s;
  cursor: pointer;
}

.gallery-card-large:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.card-image-large {
  height: 100%;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s;
}

.gallery-card-large:hover .card-image-large {
  transform: scale(1.05);
}

.card-content-large {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-content-large h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.card-content-large p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--primary);
}

/* Animations */
@keyframes float-left {
  0%,
  100% {
    transform: translateX(-20px);
  }
  50% {
    transform: translateX(0px);
  }
}

@keyframes float-up {
  0%,
  100% {
    transform: translateY(20px);
  }
  50% {
    transform: translateY(0px);
  }
}

@keyframes float-right {
  0%,
  100% {
    transform: translateX(20px);
  }
  50% {
    transform: translateX(0px);
  }
}

@keyframes slide-left {
  0%,
  100% {
    transform: translateX(-30px);
  }
  50% {
    transform: translateX(0px);
  }
}

@keyframes slide-right {
  0%,
  100% {
    transform: translateX(30px);
  }
  50% {
    transform: translateX(0px);
  }
}

.float-left {
  animation: float-left 4s ease-in-out infinite;
}
.float-up {
  animation: float-up 4s ease-in-out infinite;
}
.float-right {
  animation: float-right 4s ease-in-out infinite;
}
.slide-left {
  animation: slide-left 4s ease-in-out infinite;
}
.slide-right {
  animation: slide-right 4s ease-in-out infinite;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card-large {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 2rem;
  }
}

/* ==================== GENERATOR SECTION ==================== */
.generator {
  padding: 5rem 2rem;
  background: var(--background);
}

.generator-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
}

.generator-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.form-group textarea,
.form-group select {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group small {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.message {
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.message::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.message.error::before {
  background-color: #fca5a5;
}

.message.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.message.success::before {
  background-color: #86efac;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

/* ==================== AUDIO PLAYER ==================== */
.player-container {
  max-width: 800px;
  margin: 2rem auto;
}

.audio-player {
  padding: 2rem;
  border-radius: 1rem;
}

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

.player-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.player-duration {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

audio {
  width: 100%;
  margin: 1rem 0;
}

.player-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.player-buttons button {
  flex: 1;
}

@media (max-width: 768px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== FOOTER ==================== */
.footer {
  padding: 3rem 2rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-section a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}
