/* AI Tools Platform - Design System
   Based on iOS design guidelines */

/* Color Variables */
:root {
  /* Primary Colors */
  --primary-blue: #007AFF;
  --primary-light-blue: #5AC8FA;
  --primary-dark-blue: #0062CC;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --light-gray-1: #F5F5F7;
  --light-gray-2: #E5E5EA;
  --gray: #8E8E93;
  --dark-gray: #3A3A3C;
  --black: #1D1D1F;
  
  /* System Colors */
  --success-green: #34C759;
  --warning-yellow: #FFCC00;
  --danger-red: #FF3B30;
  --purple: #AF52DE;
  --orange: #FF9500;
  --teal: #5AC8FA;
  
  /* Spacing Variables */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  
  /* Shadow */
  --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-heavy: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  color: var(--black);
  margin: 0;
  padding: 0;
  background-color: var(--light-gray-1);
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  margin-top: 0;
}

h1 {
  font-size: 34px;
  line-height: 41px;
}

h2 {
  font-size: 28px;
  line-height: 34px;
}

h3 {
  font-size: 22px;
  line-height: 28px;
}

h4 {
  font-size: 20px;
  line-height: 25px;
}

h5 {
  font-size: 17px;
  line-height: 22px;
}

h6 {
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
}

p {
  font-size: 17px;
  line-height: 22px;
  margin-bottom: var(--spacing-md);
}

.text-small {
  font-size: 15px;
  line-height: 20px;
}

.text-tiny {
  font-size: 13px;
  line-height: 18px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-blue);
  color: var(--white);
  border: none;
}

.btn-primary:hover {
  background-color: var(--primary-dark-blue);
}

.btn-secondary {
  background-color: var(--light-gray-2);
  color: var(--black);
  border: none;
}

.btn-secondary:hover {
  background-color: var(--gray);
  color: var(--white);
}

.btn-danger {
  background-color: var(--danger-red);
  color: var(--white);
  border: none;
}

.btn-success {
  background-color: var(--success-green);
  color: var(--white);
  border: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
}

.btn-outline:hover {
  background-color: var(--primary-blue);
  color: var(--white);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 15px;
}

.btn-lg {
  padding: 16px 24px;
  font-size: 19px;
}

/* Cards */
.card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-light);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* Form Elements */
input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--light-gray-2);
  background-color: var(--white);
  font-size: 17px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  font-size: 15px;
  color: var(--dark-gray);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-sm {
  gap: var(--spacing-sm);
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-sm { margin-top: var(--spacing-sm); margin-bottom: var(--spacing-sm); }
.my-md { margin-top: var(--spacing-md); margin-bottom: var(--spacing-md); }
.my-lg { margin-top: var(--spacing-lg); margin-bottom: var(--spacing-lg); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Media Queries for Responsive Design */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  padding: var(--spacing-md) 0;
}

/* Style for nav within a container, making it consistent with home.html's compact header */
.container .nav {
    height: 48px; /* Consistent reduced header height */
    min-height: auto;
    padding: 0 var(--spacing-lg); /* Consistent padding */
    /* display: flex; and align-items: center; are inherited from .nav or can be re-declared if needed for specificity */
    /* Forcing them here to ensure the override is complete */
    display: flex;
    align-items: center;
}

.nav-logo {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-blue);
}

.nav-items {
  display: flex;
  margin-left: auto;
  gap: var(--spacing-lg);
}

.nav-link {
  color: var(--dark-gray);
  text-decoration: none;
  font-size: 17px;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-blue);
}

.nav-link.active {
  color: var(--primary-blue);
  font-weight: 500;
}

/* Components */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.badge-primary {
  background-color: var(--primary-blue);
  color: var(--white);
}

.badge-success {
  background-color: var(--success-green);
  color: var(--white);
}

.badge-warning {
  background-color: var(--warning-yellow);
  color: var(--black);
}

.badge-danger {
  background-color: var(--danger-red);
  color: var(--white);
}

/* Tags and Pills */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  margin-right: 8px;
  margin-bottom: 8px;
}

.tag-blue {
  background-color: rgba(0, 122, 255, 0.1);
  color: var(--primary-blue);
}

.tag-green {
  background-color: rgba(52, 199, 89, 0.1);
  color: var(--success-green);
}

.tag-orange {
  background-color: rgba(255, 149, 0, 0.1);
  color: var(--orange);
}

.tag-purple {
  background-color: rgba(175, 82, 222, 0.1);
  color: var(--purple);
}

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
}

.avatar-xl {
  width: 96px;
  height: 96px;
}

/* Rating Stars */
.rating {
  display: flex;
  align-items: center;
}

.stars {
  color: var(--warning-yellow);
  font-size: 18px;
}

.rating-count {
  color: var(--gray);
  font-size: 14px;
  margin-left: 6px;
}

/* Price Tags */
.price {
  font-weight: 600;
  color: var(--black);
}

.price-lg {
  font-size: 24px;
}

.price-original {
  text-decoration: line-through;
  color: var(--gray);
  margin-right: 8px;
}

.price-discount {
  color: var(--danger-red);
}

/* Feature List */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.feature-icon {
  color: var(--primary-blue);
  margin-right: var(--spacing-sm);
  flex-shrink: 0;
}

/* Progress Bar */
.progress {
  height: 8px;
  background-color: var(--light-gray-2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-blue);
  border-radius: 4px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--light-gray-2);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-blue);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Carousel/Slider */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

.carousel-slides {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  flex-shrink: 0;
  width: 100%;
}

.carousel-slide img {
  width: 100%;
  object-fit: cover;
}

.carousel-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.carousel-indicator.active {
  background-color: var(--white);
} 