/* ============================================
   The Fun Sapienza - Modern Design System
   A clean, responsive, and animated UI framework
   ============================================ */

/* Import Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */
:root {
  /* Primary Color Palette */
  --primary: #FF6B8B;
  --primary-light: #FF8FA8;
  --primary-dark: #E5526E;
  
  /* Secondary Color Palette */
  --secondary: #4CD2FF;
  --secondary-light: #7FDFFF;
  --secondary-dark: #2BBCE8;
  
  /* Accent Colors */
  --accent: #FFD93D;
  --accent-light: #FFE680;
  --accent-dark: #E5C235;
  
  /* Tertiary/Success */
  --tertiary: #6DD5A0;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  
  /* Neutral Colors */
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --surface-elevated: #FFFFFF;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, var(--tertiary) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 100%);
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-glow-primary: 0 8px 32px rgba(255, 107, 139, 0.25);
  --shadow-glow-secondary: 0 8px 32px rgba(76, 210, 255, 0.25);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
  
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  
  /* Typography */
  --font-family: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Quicksand', 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Font Sizes - Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);
  --text-5xl: clamp(3rem, 2.25rem + 3.75vw, 4.5rem);
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-Index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-tooltip: 600;
}

/* ============================================
   Base Reset & Typography
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--background);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* ============================================
   Layout Components
   ============================================ */

/* Container */
.container-fluid {
  width: 100%;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* Modern Main Content */
.main-content {
  margin-left: 250px;
  margin-top: 80px;
  padding: var(--space-8);
  min-height: calc(100vh - 80px);
  transition: margin var(--transition-base);
}

@media (max-width: 992px) {
  .main-content {
    margin-left: 80px;
    padding: var(--space-6);
  }
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding: var(--space-4);
    padding-top: calc(70px + var(--space-4));
    padding-bottom: 100px;
  }
}

/* ============================================
   Modern Navbar/Taskbar
   ============================================ */
.taskbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  justify-content: space-between;
  z-index: var(--z-fixed);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.taskbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.logo:hover img {
  transform: scale(1.05) rotate(5deg);
  box-shadow: var(--shadow-lg);
}

/* Search */
.search-form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  width: 100%;
  max-width: 400px;
  transition: all var(--transition-base);
}

.search-form:focus-within {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.1);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  font-size: var(--text-sm);
  padding: var(--space-2);
  outline: none;
}

.search-input::placeholder {
  color: rgba(255,255,255,0.7);
}

.search-button {
  background: transparent;
  border: none;
  color: white;
  padding: var(--space-2);
  cursor: pointer;
  opacity: 0.8;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.search-button:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Right Taskbar */
.right-taskbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Cart Icon */
.cart-icon {
  position: relative;
  color: white;
  transition: transform var(--transition-fast);
}

.cart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.cart-icon:hover .cart-container {
  background: rgba(255,255,255,0.25);
  transform: scale(1.08);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  background: var(--accent);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

/* Login Button */
.login-button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: white;
  color: var(--primary);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--primary-dark);
}

/* ============================================
   Modern Sidebar
   ============================================ */
.sidebar {
  position: fixed;
  top: 70px;
  left: 0;
  width: 250px;
  height: calc(100vh - 70px);
  background: var(--surface);
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  z-index: var(--z-sticky);
  overflow-y: auto;
  transition: all var(--transition-base);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.sidebar li {
  margin-bottom: var(--space-2);
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.sidebar a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transform: scaleY(0);
  transition: transform var(--transition-fast);
}

.sidebar a:hover,
.sidebar a.active {
  background: linear-gradient(135deg, rgba(255,107,139,0.08) 0%, rgba(76,210,255,0.08) 100%);
  color: var(--primary);
}

.sidebar a:hover::before,
.sidebar a.active::before {
  transform: scaleY(1);
}

.sidebar a i {
  font-size: 18px;
  width: 24px;
  text-align: center;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.sidebar a:hover i,
.sidebar a.active i {
  opacity: 1;
}

.sidebar-separator {
  margin: var(--space-4) 0;
}

.sidebar-separator > div {
  height: 1px;
  background: var(--border-light);
}

/* Tablet Sidebar */
@media (max-width: 992px) {
  .sidebar {
    width: 70px;
    padding: var(--space-4) var(--space-2);
  }
  
  .sidebar a {
    justify-content: center;
    padding: var(--space-3);
  }
  
  .sidebar a span {
    display: none;
  }
  
  .sidebar a i {
    font-size: 20px;
    margin: 0;
  }
  
  .sidebar a::before {
    display: none;
  }
}

/* Mobile Sidebar */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    z-index: calc(var(--z-fixed) + 1);
    padding-top: var(--space-6);
    transition: left var(--transition-base);
  }
  
  .sidebar.open,
  .sidebar.active {
    left: 0;
  }
  
  .sidebar a span {
    display: inline;
  }
  
  .sidebar a {
    justify-content: flex-start;
    padding: var(--space-4);
  }
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-fixed);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.mobile-nav-toggle:hover {
  background: rgba(255,255,255,0.25);
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: flex;
  }
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* Product Card */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 2px;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.product-image-container {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--background) 0%, var(--border-light) 100%);
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-image-container img {
  transform: scale(1.08);
}

.product-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.product-badge.new {
  background: var(--success);
  color: white;
}

.product-badge.hot {
  background: var(--error);
  color: white;
}

.product-badge.premium {
  background: var(--accent);
  color: var(--text-primary);
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
}

.product-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.product-price {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.product-price .original {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Feature Card */
.feature-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  font-size: 32px;
  color: white;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-glow-primary);
}

.feature-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.feature-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* Class Card */
.class-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.class-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.class-image {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.class-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.class-card:hover .class-image img {
  transform: scale(1.08);
}

.class-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
}

.badge-level {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
  width: fit-content;
}

.class-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.class-details {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border);
}

.class-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.class-info i {
  color: var(--secondary);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-family);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.5;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow-primary);
  color: white;
}

.btn-secondary {
  background: var(--secondary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  box-shadow: var(--shadow-glow-secondary);
  color: white;
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--background);
  color: var(--text-primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
  position: relative;
  padding: var(--space-16) 0;
  border-radius: var(--radius-2xl);
  margin: var(--space-6);
  overflow: hidden;
  background: var(--gradient-primary);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: white;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--space-8);
  max-width: 600px;
}

.hero-btn {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
}

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

.hero-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  color: var(--primary-dark);
}

.hero-btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}

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

.hero-image img {
  max-width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  transition: transform var(--transition-slow);
}

.hero-image:hover img {
  transform: scale(1.02) rotate(1deg);
}

/* ============================================
   Section Styles
   ============================================ */
.section-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-3);
  position: relative;
}

.section-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-12);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn var(--transition-slow) ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp var(--transition-slow) ease-out forwards;
}

.animate-fade-in-down {
  animation: fadeInDown var(--transition-slow) ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft var(--transition-slow) ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight var(--transition-slow) ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn var(--transition-slow) ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
  animation: bounce 2s ease-in-out infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Staggered Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Intersection Observer Animation Triggers */
[data-animate] {
  opacity: 0;
}

[data-animate].visible {
  animation-fill-mode: forwards;
}

[data-animate="fade-up"].visible {
  animation: fadeInUp 0.6s ease-out forwards;
}

[data-animate="fade-down"].visible {
  animation: fadeInDown 0.6s ease-out forwards;
}

[data-animate="fade-left"].visible {
  animation: fadeInLeft 0.6s ease-out forwards;
}

[data-animate="fade-right"].visible {
  animation: fadeInRight 0.6s ease-out forwards;
}

[data-animate="scale"].visible {
  animation: scaleIn 0.6s ease-out forwards;
}

/* ============================================
   Glassmorphism Effects
   ============================================ */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-primary {
  background: linear-gradient(135deg, rgba(255,107,139,0.15) 0%, rgba(76,210,255,0.15) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   Utility Classes
   ============================================ */

/* Text Colors */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }

/* Background Colors */
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-accent { background-color: var(--accent); }
.bg-surface { background-color: var(--surface); }

/* Gradient Text */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-glow { box-shadow: var(--shadow-glow-primary); }

/* Rounded Corners */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Spacing */
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================
   Form Styles
   ============================================ */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 107, 139, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* ============================================
   Responsive Breakpoints
   ============================================ */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Desktop (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .container {
    max-width: 1140px;
  }
}

/* Tablet Landscape (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  
  .hero-title {
    font-size: var(--text-4xl);
  }
}

/* Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .container {
    max-width: 720px;
  }
  
  .hero-section {
    padding: var(--space-12) 0;
    margin: var(--space-4);
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-lg);
  }
  
  .section-title {
    font-size: var(--text-2xl);
  }
  
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Landscape (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .container {
    max-width: 540px;
  }
  
  .hero-section {
    padding: var(--space-10) 0;
    margin: var(--space-3);
    text-align: center;
  }
  
  .hero-title {
    font-size: var(--text-2xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-base);
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-image {
    margin-top: var(--space-6);
  }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Portrait (< 576px) */
@media (max-width: 575px) {
  :root {
    --space-6: 20px;
    --space-8: 24px;
    --space-12: 36px;
    --space-16: 48px;
  }
  
  .hero-section {
    padding: var(--space-8) 0;
    margin: var(--space-2);
    border-radius: var(--radius-xl);
  }
  
  .hero-title {
    font-size: var(--text-2xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-sm);
  }
  
  .section-title {
    font-size: var(--text-xl);
  }
  
  .section-subtitle {
    font-size: var(--text-sm);
  }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .feature-card {
    padding: var(--space-6);
  }
  
  .feature-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }
  
  .btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }
  
  /* Mobile Taskbar */
  .taskbar {
    height: 60px;
    padding: 0 var(--space-4);
  }
  
  .search-form {
    display: none;
  }
  
  .logo img {
    width: 40px;
    height: 40px;
  }
}

/* Extra Small (< 400px) */
@media (max-width: 399px) {
  .hero-title {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }
  
  .product-info {
    padding: var(--space-4);
  }
  
  .right-taskbar {
    gap: var(--space-2);
  }
  
  .cart-container {
    width: 38px;
    height: 38px;
  }
  
  .login-button span {
    display: none;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .sidebar,
  .taskbar,
  .mobile-nav-toggle {
    display: none !important;
  }
  
  .main-content {
    margin: 0;
    padding: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   Loading States
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--background) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   Toast/Notification
   ============================================ */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: fadeInUp 0.3s ease-out;
  z-index: var(--z-tooltip);
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--error);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

/* ============================================
   Scroll Reveal Animation Script Hook
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
