:root {
  /* Color Palette */
  --background: #09090b;
  --foreground: #f8fafc;
  
  --primary: #6366f1; /* Electric Indigo */
  --primary-hover: #4f46e5;
  --secondary: #ec4899; /* Neon Pink */
  --accent: #06b6d4; /* Cyan */
  
  /* Glassmorphism Surfaces */
  --glass-surface: rgba(255, 255, 255, 0.03);
  --glass-surface-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  /* Solid Surfaces for fallback */
  --surface: #1e1e24;
  --surface-hover: #2a2a32;
  --border: #2d2d35;
  --text-muted: #94a3b8;
  
  /* Borders */
  --border-radius-sm: 0.5rem;
  --border-radius-md: 0.75rem;
  --border-radius-lg: 1.25rem;
  --border-radius-xl: 2rem;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadows */
  --shadow-sm: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 30px -4px rgba(0, 0, 0, 0.6);
  --shadow-neon: 0 0 25px rgba(99, 102, 241, 0.4);
  --shadow-neon-pink: 0 0 25px rgba(236, 72, 153, 0.4);
}

/* Base resets and animations */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  height: 100%;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--foreground);
  background: var(--background);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.05), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.05), transparent 25%);
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, var(--primary), var(--secondary));
}

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

.animate-fade-in {
  animation: fadeIn var(--transition-normal) forwards;
}

/* Page Layout */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
  flex-grow: 1;
}

/* Navbar Component */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--glass-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 1.5rem;
  z-index: 100;
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  width: 90%;
  max-width: 1200px;
  margin: 1.5rem auto 1rem auto;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-normal);
}

.logo a {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, var(--primary), var(--secondary));
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  transition: color var(--transition-fast);
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--foreground);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.login-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.login-link:hover {
  color: var(--foreground);
}

.cart-widget {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-widget:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
}

/* Footer Component */
.footer {
  text-align: center;
  padding: 2.5rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4rem;
}

/* Home Styling */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1rem;
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  margin-bottom: 4rem;
  box-shadow: var(--shadow-sm);
}

.hero-blob-1, .hero-blob-2 {
  position: absolute;
  width: 300px;
  height: 300px;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}

.hero-blob-1 {
  background: var(--primary);
  top: -50px;
  left: 10%;
}

.hero-blob-2 {
  background: var(--secondary);
  bottom: -50px;
  right: 10%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.cta-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 0.9rem 2rem;
  border-radius: var(--border-radius-md);
  font-weight: 700;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
}

.cta-button-secondary {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: var(--foreground);
  padding: 0.9rem 2rem;
  border-radius: var(--border-radius-md);
  font-weight: 700;
  transition: all var(--transition-fast);
}

.cta-button-secondary:hover {
  background: var(--glass-surface-hover);
  border-color: var(--primary);
}

/* Product Section & Cards */
.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-md);
}

.card-image-container {
  position: relative;
  width: 100%;
  padding-top: 60%; /* 16:9 Aspect Ratio */
  background: #141416;
  overflow: hidden;
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

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

.category-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(9, 9, 11, 0.75);
  backdrop-filter: blur(4px);
  color: var(--primary);
  border: 1px solid var(--glass-border);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
  flex-grow: 1;
}

.card-title a:hover {
  color: var(--primary);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.card-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--foreground);
}

.add-to-cart-btn {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.add-to-cart-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Product Detail Page */
.product-detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  margin-top: 1rem;
}

.product-detail-image-container {
  width: 100%;
  aspect-ratio: 16/10;
  background: #141416;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.product-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
}

.product-detail-category {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.product-detail-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.product-detail-price {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 2rem;
  color: var(--foreground);
}

.product-detail-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.features-box {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.features-box h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.features-list {
  list-style: none;
}

.features-list li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.features-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
}

.purchase-actions {
  display: flex;
  gap: 1rem;
}

/* Auth Pages Styling */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  margin: 2rem 0;
}

.auth-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.auth-header {
  margin-bottom: 2.5rem;
}

.auth-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 0.9rem;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 1rem;
  transition: all var(--transition-fast);
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-neon);
}

.auth-footer {
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.alert {
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-align: left;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

/* Shopping Cart */
.cart-layout {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 3rem;
  margin-top: 1.5rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.item-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.remove-btn {
  color: rgba(239, 68, 68, 0.7);
  font-weight: 600;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.remove-btn:hover {
  color: rgb(239, 68, 68);
}

.order-summary {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  align-self: start;
}

.order-summary h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.summary-row strong {
  color: var(--foreground);
  font-size: 1.15rem;
}

.divider {
  height: 1px;
  background: var(--glass-border);
  margin: 1.5rem 0;
}

.checkout-btn {
  display: block;
  text-align: center;
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 0.9rem;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 1.5rem;
  transition: all var(--transition-fast);
}

.checkout-btn:hover {
  box-shadow: var(--shadow-neon);
  transform: translateY(-1px);
}

.empty-cart {
  text-align: center;
  padding: 6rem 1rem;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
}

.empty-cart h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.empty-cart p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Dashboard Styling */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.dashboard-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
}

.dashboard-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.dashboard-email {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* Table Styling */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th, .custom-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.custom-table th {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.custom-table td {
  font-size: 0.95rem;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-pending {
  background: rgba(234, 179, 8, 0.1);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.download-link-btn {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.download-link-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Admin Dashboard & Components */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  margin-top: 1rem;
}

.admin-sidebar {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 2rem 1.5rem;
  align-self: start;
}

.admin-sidebar h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.admin-menu {
  list-style: none;
}

.admin-menu li {
  margin-bottom: 0.75rem;
}

.admin-menu a {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.admin-menu a:hover, .admin-menu li.active a {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.04);
}

.admin-menu li.active a {
  border-left: 3px solid var(--primary);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.admin-stat-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--foreground);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-btn {
  background: var(--primary);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.admin-btn:hover {
  background: var(--primary-hover);
}

.admin-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--foreground);
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.admin-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.admin-btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.admin-btn-danger:hover {
  background: rgb(239, 68, 68);
  color: white;
  border-color: rgb(239, 68, 68);
}

.action-links {
  display: flex;
  gap: 0.5rem;
}
