/* ===== CSS Variables ===== */
:root {
  /* Colors */
  --primary: #ff5722;
  --primary-dark: #e64a19;
  --primary-light: #ff8a65;
  --secondary: #1a1a2e;
  --accent: #16213e;
  
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Semantic */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.5);
}

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

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

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  padding: 16px 0;
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a:not(.btn) {
  color: var(--gray-600);
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:not(.btn):hover {
  color: var(--primary);
}

/* ===== Hero ===== */
.hero {
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: var(--white);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero .highlight {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--gray-300);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 14px;
  color: var(--gray-400);
}

/* ===== How It Works ===== */
.how-it-works {
  padding: 100px 0;
  background: var(--white);
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 60px;
  color: var(--gray-900);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step {
  position: relative;
  text-align: center;
  padding: 40px 30px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease;
}

.step:hover {
  transform: translateY(-8px);
}

.step-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.step-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.step h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.step p {
  color: var(--gray-500);
}

/* ===== Features ===== */
.features {
  padding: 100px 0;
  background: var(--gray-50);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.feature-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

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

.feature-icon {
  font-size: 40px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.feature-card p {
  color: var(--gray-500);
}

/* ===== CTA ===== */
.cta {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
}

.cta h2 {
  font-size: 36px;
  margin-bottom: 16px;
}

.cta p {
  font-size: 18px;
  margin-bottom: 32px;
  opacity: 0.9;
}

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

/* ===== Footer ===== */
.footer {
  padding: 60px 0 30px;
  background: var(--secondary);
  color: var(--gray-400);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .logo-icon,
.footer-brand .logo-text {
  display: inline;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--gray-700);
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--gray-700);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all 0.2s;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-xl);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .logo {
  justify-content: center;
  margin-bottom: 24px;
}

.auth-header h1 {
  font-size: 24px;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--gray-500);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--gray-500);
}

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

/* ===== Dashboard ===== */
.dashboard {
  padding-top: 80px;
}

.dashboard-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: var(--white);
  padding: 40px 0;
}

.dashboard-greeting h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.dashboard-greeting p {
  color: var(--gray-400);
}

.balance-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: -40px;
  box-shadow: var(--shadow-lg);
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

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

.balance-label {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.balance-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
}

.balance-value.primary {
  color: var(--primary);
}

.balance-value.success {
  color: var(--success);
}

.dashboard-content {
  padding: 40px 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
}

/* ===== Link Generator ===== */
.link-generator {
  margin-bottom: 40px;
}

.link-input-group {
  display: flex;
  gap: 12px;
}

.link-input-group .form-input {
  flex: 1;
}

.link-result {
  margin-top: 20px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  display: none;
}

.link-result.show {
  display: block;
}

.link-result-url {
  display: flex;
  gap: 12px;
  align-items: center;
}

.link-result-url input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 14px;
}

.btn-copy {
  padding: 12px 20px;
  background: var(--gray-700);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
}

.btn-copy:hover {
  background: var(--gray-800);
}

/* ===== Orders Table ===== */
.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.orders-table th,
.orders-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.orders-table th {
  font-weight: 600;
  color: var(--gray-500);
  font-size: 13px;
  text-transform: uppercase;
}

.orders-table td {
  color: var(--gray-700);
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  background: #fef3c7;
  color: #d97706;
}

.status-approved {
  background: #d1fae5;
  color: #059669;
}

.status-rejected {
  background: #fee2e2;
  color: #dc2626;
}

/* ===== Alerts ===== */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.alert-error {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #d1fae5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* ===== Loading ===== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav a:not(.btn) {
    display: none;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-stats {
    gap: 30px;
  }
  
  .steps {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .balance-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .link-input-group {
    flex-direction: column;
  }
}
