/* ============================================
   IKHOST-CLOUD - Premium Dark UI
   Modern, Sleek, Professional
   ============================================ */

/* CSS Variables - Enhanced Color System */
:root {
  /* Dark Backgrounds */
  --bg-primary: #050508;
  --bg-secondary: #0c0c12;
  --bg-tertiary: #13131d;
  --bg-elevated: #1a1a27;
  
  /* Surface Colors */
  --surface: rgba(255, 255, 255, 0.02);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --surface-active: rgba(255, 255, 255, 0.08);
  --surface-glass: rgba(255, 255, 255, 0.04);
  
  /* Brand Colors - Vibrant Gradient */
  --brand-primary: #6366f1;
  --brand-secondary: #8b5cf6;
  --brand-tertiary: #a855f7;
  --brand-glow: rgba(99, 102, 241, 0.4);
  
  /* Accent Colors */
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-dim: #475569;
  
  /* Gradients */
  --gradient-brand: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 50%, var(--brand-tertiary) 100%);
  --gradient-glow: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  --gradient-mesh: radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
                   radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
                   radial-gradient(at 0% 50%, rgba(168, 85, 247, 0.05) 0px, transparent 50%);
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-brand: rgba(99, 102, 241, 0.3);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.25);
  --shadow-glow-sm: 0 0 30px rgba(99, 102, 241, 0.15);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: -1;
}

/* Selection */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

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

a:hover {
  color: var(--brand-secondary);
}

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

/* ============================================
   Landing Page
   ============================================ */

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Ambient Glow */
.landing::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-2xl);
  position: relative;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(5, 5, 8, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.links a {
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-weight: 500;
}

.links a:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

/* Hero Section */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-2xl);
  position: relative;
}

.hero h1 {
  margin-bottom: var(--space-lg);
  animation: fade-up 0.8s ease-out;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: var(--space-2xl);
  animation: fade-up 0.8s ease-out 0.1s both;
}

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

/* CTA */
.cta {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
  animation: fade-up 0.8s ease-out 0.2s both;
}

.price {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.price::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  margin-right: var(--space-sm);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

/* Features Grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  max-width: 1100px;
  width: 100%;
  animation: fade-up 0.8s ease-out 0.3s both;
}

.card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-brand);
  box-shadow: var(--shadow-glow-sm);
}

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

.card .icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  display: block;
}

.card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.15rem;
}

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

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: var(--gradient-brand);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-glow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 1rem 2rem;
  background: var(--gradient-brand);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.btn-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-glow:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.4);
}

.btn-glow:hover::before {
  opacity: 1;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: var(--surface);
  color: var(--text-primary);
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-brand);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--surface-glass);
  color: var(--text-primary);
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.btn-google svg {
  width: 20px;
  height: 20px;
}

.btn-google:hover {
  background: var(--surface-hover);
  border-color: var(--border-brand);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: var(--space-sm);
  transition: color var(--transition-fast);
}

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

.btn-full {
  width: 100%;
}

/* ============================================
   Auth Pages
   ============================================ */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
}

.auth-container {
  width: 100%;
  max-width: 440px;
  animation: fade-up 0.6s ease-out;
}

.auth-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: var(--gradient-glow);
  opacity: 0.3;
  pointer-events: none;
}

.auth-card .logo {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: var(--space-md);
}

.auth-card h1 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: var(--space-xs);
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
}

/* Input Groups */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.input-group input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-group input::placeholder {
  color: var(--text-dim);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* Footer Links */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: center;
  margin-top: var(--space-lg);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.forgot-link {
  display: block;
  text-align: center;
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.forgot-link:hover {
  color: var(--brand-primary);
}

/* Error/Success Messages */
.error {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: var(--space-md);
}

.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: var(--space-md);
}

/* Email Display */
.email-display {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
}

/* ============================================
   Dashboard
   ============================================ */

.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.main-content {
  padding: var(--space-2xl);
  overflow-y: auto;
}

.dashboard-header {
  margin-bottom: var(--space-2xl);
}

.dashboard-header h1 {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.stat-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.stat-card h3 {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
}

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

@media (max-width: 768px) {
  .nav {
    padding: var(--space-md) var(--space-lg);
  }
  
  .hero {
    padding: var(--space-2xl) var(--space-lg);
  }
  
  .cta {
    flex-direction: column;
    gap: var(--space-lg);
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .auth-card {
    padding: var(--space-xl);
  }
  
  .dashboard {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: none;
  }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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