/* ============================================
   PXLAPK - Dark Theme Design
   ============================================ */

:root {
  /* Dark Theme Colors */
  --primary: #6366F1;
  --primary-light: #818CF8;
  --primary-dark: #4F46E5;
  --secondary: #EC4899;
  --secondary-light: #F472B6;
  --secondary-dark: #DB2777;
  --accent: #F59E0B;
  --accent-light: #FBBF24;
  --accent-dark: #D97706;
  --success: #10B981;
  --success-light: #34D399;
  --success-dark: #059669;
  --warning: #F59E0B;
  --warning-light: #FBBF24;
  --warning-dark: #D97706;
  --danger: #EF4444;
  --danger-light: #F87171;
  --danger-dark: #DC2626;
  
  /* Dark Neutrals */
  --bg-dark: #0F172A;
  --bg-darker: #020617;
  --bg-card: #1E293B;
  --bg-hover: #334155;
  --text-light: #F1F5F9;
  --text-gray: #CBD5E1;
  --text-muted: #94A3B8;
  --border-dark: #334155;
  --border-light: #475569;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
}

/* ============================================
   Global Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Trebuchet MS', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-light);
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
  min-height: 100vh;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-gray);
}

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

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

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-xl);
  border: none;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

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

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  color: white;
}

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

.btn-outline:hover {
  background: var(--primary-dark);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 0.875rem;
}

.btn-lg {
  padding: var(--spacing-lg) var(--spacing-2xl);
  font-size: 1.125rem;
}

/* ============================================
   Container & Layout
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-2xl) 0;
}

.section-light {
  background: var(--bg-card);
}

.section-gradient {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
}

/* ============================================
   Header & Navigation
   ============================================ */

header {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-dark);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

nav {
  display: flex;
  gap: var(--spacing-xl);
  align-items: center;
}

nav a {
  color: var(--text-gray);
  font-weight: 500;
  transition: color 0.3s ease;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
}

nav a:hover {
  color: var(--primary-light);
  background: var(--bg-hover);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
  padding: var(--spacing-2xl) 0;
  text-align: center;
  border-radius: var(--radius-lg);
  margin: var(--spacing-xl) 0;
  border: 1px solid var(--border-dark);
}

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

.hero p {
  font-size: 1.25rem;
  color: var(--text-gray);
  margin-bottom: var(--spacing-xl);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--border-dark);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 1px solid var(--border-dark);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-light);
}

.card-description {
  color: var(--text-gray);
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: var(--spacing-md);
}

.card-footer {
  display: flex;
  gap: var(--spacing-md);
  justify-content: space-between;
  align-items: center;
}

/* ============================================
   Grid Layouts
   ============================================ */

.grid {
  display: grid;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============================================
   Category Navigation
   ============================================ */

.category-nav {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
  justify-content: center;
}

.category-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 2px solid var(--border-dark);
  background: var(--bg-card);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--text-gray);
}

.category-btn:hover,
.category-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

/* ============================================
   Product Page
   ============================================ */

.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
  margin-bottom: var(--spacing-2xl);
}

.product-image {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-dark);
}

.product-info h1 {
  margin-bottom: var(--spacing-lg);
}

.product-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: var(--spacing-lg);
}

.product-features {
  margin: var(--spacing-xl) 0;
}

.product-features h3 {
  margin-bottom: var(--spacing-md);
}

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

.feature-list li {
  padding: var(--spacing-sm) 0;
  padding-left: var(--spacing-lg);
  position: relative;
  color: var(--text-gray);
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 1.25rem;
}

.product-cta {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

/* ============================================
   Forms
   ============================================ */

.form-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--text-light);
}

input,
textarea,
select {
  width: 100%;
  padding: var(--spacing-md);
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--bg-card);
  color: var(--text-light);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   Footer
   ============================================ */

footer {
  background: var(--bg-card);
  color: var(--text-light);
  padding: var(--spacing-2xl) 0;
  margin-top: var(--spacing-2xl);
  border-top: 1px solid var(--border-dark);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.footer-section a {
  color: var(--text-gray);
  display: block;
  margin-bottom: var(--spacing-sm);
}

.footer-section a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--border-dark);
  color: var(--text-muted);
}

/* ============================================
   Messages & Alerts
   ============================================ */

.alert {
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  border-left: 4px solid;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-light);
  border-left-color: var(--success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-light);
  border-left-color: var(--danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-light);
  border-left-color: var(--warning);
}

.alert-info {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  border-left-color: var(--primary);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  nav {
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
  }
  
  .product-hero {
    grid-template-columns: 1fr;
  }
  
  .product-image {
    height: 250px;
    font-size: 3rem;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .product-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

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

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-md {
  margin-top: var(--spacing-lg);
}

.mb-md {
  margin-bottom: var(--spacing-lg);
}

.py-xl {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
}

.hidden {
  display: none;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}
