/* ========================================
   AI TUTOR - SHOPIFY-INSPIRED DESIGN
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Shopify Color Palette */
  --primary: #008060;
  --primary-dark: #00563e;
  --primary-light: #d3f9e8;
  --secondary: #0097b2;
  --accent: #f8b500;
  --accent-light: #fffaf0;
  
  /* Neutral Colors */
  --dark: #202223;
  --darker: #121212;
  --light: #f5f5f5;
  --lighter: #fafafa;
  --white: #ffffff;
  
  /* Text Colors */
  --text-primary: #202223;
  --text-secondary: #5a6366;
  --text-light: #8a8f93;
  
  /* Borders */
  --border: #e1e3e5;
  --border-light: #f0f0f0;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 15px 40px rgba(0, 0, 0, 0.18);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: #f0f0f0;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

html.dark-mode body {
  background: var(--darker);
  color: #f0f0f0;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

/* ========== CONTAINER ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== BANNER ========== */
.banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.banner-content {
  position: relative;
  z-index: 1;
}

.banner h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.banner p {
  font-size: 1rem;
  font-weight: 400;
}

/* ========== HEADER ========== */
header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

html.dark-mode header {
  background: var(--darker);
  border-bottom-color: #333;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

html.dark-mode .logo {
  color: var(--primary-light);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  flex: 1;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

html.dark-mode .nav-links a {
  color: #cbd5e1;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ========== HERO ========== */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5f1 0%, #f0f0f0 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

html.dark-mode .hero {
  background: linear-gradient(135deg, #1a1a1a 0%, var(--darker) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 128, 96, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.15;
  animation: slideInUp 0.8s ease;
  font-weight: 700;
}

html.dark-mode .hero h1 {
  color: var(--white);
}

.hero .highlight {
  color: var(--primary);
}

.hero p {
    font-size: 1.25rem;
    color: white;
    margin-bottom: 2.5rem;
    animation: slideInUp 0.8s ease 0.1s both;
    font-weight: 400;
}

html.dark-mode .hero p {
  color: #cbd5e1;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  animation: slideInUp 0.8s ease 0.2s both;
  flex-wrap: wrap;
}

/* ========== PROFILE ========== */
.profile-header {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4rem;
  margin: 4rem 0;
  text-align: center;
}

html.dark-mode .profile-header {
  background: #1a1a1a;
  border-color: #333;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 2rem;
  box-shadow: var(--shadow-lg);
  animation: bounce 2s ease-in-out infinite;
  border: 4px solid var(--white);
}

html.dark-mode .avatar {
  border-color: var(--darker);
}

.user-name {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

html.dark-mode .user-name {
  color: var(--white);
}

.user-email {
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.user-bio {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.8;
}

/* ========== STATS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 4rem 0;
}

.stat-card {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

html.dark-mode .stat-card {
  background: #1a1a1a;
  border-color: #333;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

/* ========== FEATURES ========== */
.features {
  margin: 4rem 0;
  padding: 4rem 0;
  background: #f0f0f0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

html.dark-mode .features {
  background: #1a1a1a;
  border-color: #333;
}

.section-title {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 700;
}

html.dark-mode .section-title {
  color: var(--white);
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  max-width: 500px;
  margin: 0 auto 3rem;
  font-weight: 400;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: var(--transition);
  position: relative;
}

html.dark-mode .feature-card {
  background: var(--darker);
  border-color: #333;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: top;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
  transform: scaleY(1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

html.dark-mode .feature-title {
  color: var(--white);
}

.feature-desc {
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
}

/* ========== SUBSCRIPTION ========== */
.subscription {
  margin: 4rem 0;
  padding: 4rem 0;
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.plan-card {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

html.dark-mode .plan-card {
  background: #1a1a1a;
  border-color: #333;
}

.plan-card.featured {
  border-color: var(--primary);
  transform: scale(1.04);
  box-shadow: var(--shadow-lg);
}

.plan-card.featured::before {
  content: '? POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.plan-name {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

html.dark-mode .plan-name {
  color: var(--white);
}

.plan-price {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.plan-duration {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.plan-features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}

.plan-features li {
  padding: 0.8rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
  font-weight: 400;
}

html.dark-mode .plan-features li {
  color: #cbd5e1;
  border-bottom-color: #333;
}

.plan-features li::before {
  content: '? ';
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.5rem;
}

.plan-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.plan-card.featured:hover {
  transform: scale(1.04) translateY(-6px);
}

/* ========== CHAT ========== */
.chat-section {
  margin: 4rem 0;
  padding: 4rem 0;
  background: #f0f0f0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

html.dark-mode .chat-section {
  background: #1a1a1a;
  border-color: #333;
}

.chat-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.chat-preview {
  background: #fafafa;
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  position: relative;
}

html.dark-mode .chat-preview {
  background: var(--darker);
  border-color: #333;
}

.chat-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 12px 12px 0 0;
}

.chat-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-header-status {
  width: 8px;
  height: 8px;
  background: #31a24c;
  border-radius: 50%;
}

.chat-messages {
  margin-top: 40px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  display: flex;
  gap: 1rem;
  animation: slideInUp 0.5s ease;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 70%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-bubble.ai {
  background: var(--primary-light);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.chat-bubble.user {
  background: var(--primary);
  color: var(--white);
  font-weight: 500;
}

.chat-input-area {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

html.dark-mode .chat-input-area {
  border-top-color: #333;
}

.chat-input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

html.dark-mode .chat-input {
  background: #333;
  border-color: #444;
  color: var(--white);
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.1);
}

.chat-btn {
  padding: 0.8rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  font-size: 1.1rem;
}

.chat-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.chat-info h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

html.dark-mode .chat-info h3 {
  color: var(--white);
}

.chat-info p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-weight: 400;
}

html.dark-mode .chat-info p {
  color: #cbd5e1;
}

.chat-features-list {
  list-style: none;
  margin-bottom: 2rem;
}

.chat-features-list li {
  padding: 0.8rem 0;
  color: var(--text-secondary);
  display: flex;
  gap: 0.8rem;
  font-weight: 400;
}


/* ========== FOOTER ========== */
footer {
  background: var(--dark);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

html.dark-mode footer {
  background: var(--darker);
  border-top-color: #333;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section p {
  color: #8a8f93;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-weight: 400;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section a {
  color: #8a8f93;
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: #5a6366;
}

html.dark-mode .footer-bottom {
  border-top-color: #333;
}

/* ========== POLICY PAGES ========== */
.policy-content {
  max-width: 900px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fafafa;
  border-radius: 12px;
  line-height: 1.8;
}

html.dark-mode .policy-content {
  background: #1a1a1a;
  color: #cbd5e1;
}

.policy-content h2 {
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.5rem;
}

.policy-content h3 {
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

html.dark-mode .policy-content h3 {
  color: var(--white);
}

.policy-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

html.dark-mode .policy-content p {
  color: #cbd5e1;
}

.policy-list {
  margin: 1rem 0 1rem 2rem;
  list-style: disc;
}

.policy-list li {
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
}

html.dark-mode .policy-list li {
  color: #cbd5e1;
}

.policy-date {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

html.dark-mode .policy-date {
  color: #999;
  border-top-color: #333;
}

/* ========== BUSINESS INFO BANNER ========== */
.business-info-banner {
  background: var(--dark);
  color: #8a8f93;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

html.dark-mode .business-info-banner {
  background: #0a0a0a;
  border-top-color: #333;
}

.business-info-banner p {
  margin: 0;
}

.business-info-banner strong {
  color: var(--white);
}

/* Footer business name styling */
.footer-section .business-name {
  color: var(--white);
  font-size: 0.95rem;
}

.footer-section .business-address {
  color: #8a8f93;
  font-size: 0.85rem;
}

.footer-bottom .footer-address {
  font-size: 0.85rem;
  color: #5a6366;
  margin-top: 0.5rem;
}

/* ========== ANIMATIONS ========== */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .profile-header {
    padding: 2rem 1rem;
  }

  .chat-container {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 2rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .plan-card.featured {
    transform: scale(1);
  }

  .plan-card.featured:hover {
    transform: translateY(-6px);
  }

  .banner h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .nav-buttons {
    gap: 0.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .subscription-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 16px;
  }
}
