/* Global Styles */
:root {
  --primary-color: #5000ff;
  --secondary-color: #7b68ee;
  --text-color: #333;
  --light-text: #555;
  --background-color: #fff;
  --light-background: #f8f9fa;
  --border-color: #e1e1e1;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --musicharts-purple: #5000ff;
  --musicharts-light-purple: #7b68ee;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--background-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header {
  background-color: var(--background-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 5%;
}

.logo img {
  height: 28px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-color);
  padding: 8px 10px;
  border-radius: 6px;
}

.nav-links a:hover {
  color: var(--primary-color);
  background: rgba(80,0,255,0.06);
}

.language-selector-container select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-buttons .btn-login,
.nav-buttons .btn-signup,
.nav-buttons .btn-admin,
.nav-buttons .btn-demo,
.btn-outline {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.nav-buttons .btn-login:hover,
.nav-buttons .btn-signup:hover,
.nav-buttons .btn-admin:hover,
.nav-buttons .btn-demo:hover,
.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(106, 73, 242, 0.3);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ff 100%);
  padding: 100px 5%;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--light-text);
  max-width: 700px;
  margin: 0 auto 30px;
}

/* Features Section */
.features {
  padding: 80px 5%;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.section-title p {
  color: var(--light-text);
  max-width: 700px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.feature-card h3 {
  margin-bottom: 15px;
}

/* Pricing Section */
.pricing {
  padding: 80px 5%;
  background-color: var(--light-background);
}

.pricing-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.plan-card {
  background: white;
  border-radius: 10px;
  padding: 40px 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.3s ease;
}

.plan-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.plan-card.popular {
  border: 2px solid var(--primary-color);
  position: relative;
}

.popular-badge {
  position: absolute;
  top: -15px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.plan-name {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.plan-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--light-text);
}

.plan-features {
  list-style: none;
  margin-bottom: 30px;
}

.plan-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.plan-features li:last-child {
  border-bottom: none;
}

/* FAQ Section */
.faq {
  padding: 80px 5%;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
}

.faq-question {
  padding: 20px;
  background-color: var(--light-background);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 20px;
  max-height: 1000px;
}

/* Footer */
footer {
  background-color: #1a1a1a;
  color: white;
  padding: 60px 5% 30px;
}

.footer-content, .footer-grid, .footer-top .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #aaa;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #333;
  color: #aaa;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  color: #aaa;
  font-size: 1.2rem;
}

.social-links a:hover {
  color: white;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow: auto;
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  position: relative;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control,
.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus,
.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(80, 0, 255, 0.08);
}

/* Auth container */
.auth-container {
  max-width: 420px;
  margin: 100px auto;
  padding: 30px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.auth-header h2 { margin-bottom: 8px; }
.auth-header p { color: var(--light-text); }

.auth-form button,
.auth-container .btn-primary {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.auth-form button:hover { filter: brightness(0.95); }

/* Responsive Styles */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links { position: fixed; top: 70px; left: -100%; width: 100%; height: calc(100vh - 70px); background-color: white; flex-direction: column; align-items: center; padding-top: 24px; transition: all 0.25s ease; }
  .nav-links.active { left: 0; }
  .nav-links a { padding: 12px 16px; }
  .hero h1 { font-size: 2.2rem; }
  .section-title h2 { font-size: 1.8rem; }
}

/* Stripe Elements */
.StripeElement {
  box-sizing: border-box;
  height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
  transition: box-shadow 150ms ease;
}

.StripeElement--focus {
  box-shadow: 0 1px 3px 0 #cfd7df;
}

.StripeElement--invalid {
  border-color: var(--danger-color);
}

.StripeElement--webkit-autofill {
  background-color: #fefde5 !important;
}

/* Card Error */
#card-errors {
  color: var(--danger-color);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Success Message */
.success-message {
  text-align: center;
  color: var(--success-color);
  padding: 20px;
  border: 1px solid var(--success-color);
  border-radius: 5px;
  margin-bottom: 20px;
  display: none;
}

/* ---------- Page sections enhanced styling ---------- */
/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 28px;
}
.hero .hero-content { max-width: 900px; }
.hero .hero-image img { max-width: 900px; width: 100%; height: auto; }

/* Features section: grid of cards centered */
.features {
  padding: 80px 5%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.features > h2, .features > h3, .features > p { grid-column: 1 / -1; text-align: center; }

/* Platform coverage */
.platform-coverage { padding: 80px 5%; text-align: center; }
.platform-logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 20px; max-width: 900px; margin: 30px auto 0; align-items: center; }
.platform-logo img { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto 8px; }
.platform-logo span { display: block; color: #555; }

/* Testimonials */
.testimonials { padding: 80px 5%; background: #fafbff; text-align: center; }
.testimonial-slider { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; max-width: 1100px; margin: 0 auto; }
.testimonial-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 8px 24px rgba(0,0,0,0.06); text-align: left; }
.testimonial-author { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.testimonial-author img { width: 40px; height: 40px; border-radius: 50%; }

/* Features showcase */
.features-showcase { padding: 80px 5%; text-align: center; }
.feature-showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 1100px; margin: 0 auto; }
.feature-showcase-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

/* Case studies */
.case-studies { padding: 80px 5%; background: #ffffff; }
.case-studies h2, .case-studies h3 { text-align: center; }
.case-studies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; max-width: 1100px; margin: 30px auto 0; }
.case-study-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.case-study-image img { width: 100%; height: 160px; object-fit: cover; display: block; }
.case-study-card .read-more { display: inline-block; margin: 12px 20px 20px; }

/* CTA */
.cta { padding: 80px 5%; background: linear-gradient(135deg, #f6f7ff 0%, #eef0ff 100%); text-align: center; }
.cta .cta-content { max-width: 700px; margin: 0 auto; }

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
  vertical-align: middle;
}

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

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}