/* Base Styles - Variables, Resets, Typography */

/* Loading Screen */
.loader-wrapper {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
  overflow: hidden;
}

[data-theme="dark"] .loader-wrapper {
  background: rgba(15, 23, 42, 0.95);
}

.loader-wrapper.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cloud-container {
  position: relative;
  width: 150px;
  height: 100px;
}

.cloud {
  width: 100px;
  height: 40px;
  background: #7A3C96;
  border-radius: 50px;
  position: absolute;
  top: 20px;
  left: 25px;
  animation: cloudFloat 3s ease-in-out infinite;
}

[data-theme="dark"] .cloud {
  background: #a87dbd;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: #7A3C96;
  border-radius: 50%;
}

[data-theme="dark"] .cloud::before,
[data-theme="dark"] .cloud::after {
  background: #a87dbd;
}

.cloud::before {
  width: 50px;
  height: 50px;
  top: -25px;
  left: 10px;
}

.cloud::after {
  width: 60px;
  height: 40px;
  top: -20px;
  right: 10px;
}

.rain {
  position: absolute;
  width: 2px;
  height: 15px;
  background: #54B9EE;
  bottom: 0;
  animation: rainFall 1s linear infinite;
}

[data-theme="dark"] .rain {
  background: #7dcbf5;
}

.rain:nth-child(2) { left: 40px; animation-delay: 0.2s; }
.rain:nth-child(3) { left: 60px; animation-delay: 0.4s; }
.rain:nth-child(4) { left: 80px; animation-delay: 0.6s; }
.rain:nth-child(5) { left: 100px; animation-delay: 0.8s; }

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

@keyframes rainFall {
  0% { transform: translateY(-20px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}

/* CSS Variables */
/* Logo Colors: #7A3C96 (Purple), #54B9EE (Light Blue), #377AC1 (Steel Blue), #324FA1 (Dark Blue) */
:root {
  color-scheme: light;
  --bg-primary: #ffffff;
  --bg-elevated: #fafbfc;
  --bg-highlight: #f5f7fa;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-glass-elevated: rgba(255, 255, 255, 0.98);
  --text-primary: #1a1a2e;
  --text-strong: #0f0f1e;
  --text-muted: #64748b;
  --accent: #54B9EE;
  --accent-soft: rgba(84, 185, 238, 0.08);
  --accent-glow: rgba(84, 185, 238, 0.25);
  --brand: #7A3C96;
  --brand-light: #a87dbd;
  --brand-dark: #5e2d75;
  --brand-gradient: linear-gradient(135deg, #7A3C96 0%, #377AC1 50%, #54B9EE 100%);
  --secondary: #377AC1;
  --secondary-light: #6ba3d8;
  --success: #10b981;
  --warning: #f59e0b;
  --border: rgba(122, 60, 150, 0.15);
  --border-glass: rgba(122, 60, 150, 0.2);
  --shadow-primary: 0 10px 40px -15px rgba(122, 60, 150, 0.35);
  --shadow-soft: 0 4px 20px -8px rgba(122, 60, 150, 0.1);
  --shadow-glass: 0 8px 32px rgba(122, 60, 150, 0.12);
  --shadow-glow: 0 0 24px rgba(84, 185, 238, 0.3);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --blur-light: blur(12px);
  --blur-heavy: blur(20px);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #0a0e1a;
  --bg-elevated: #151b2e;
  --bg-highlight: #1f2937;
  --bg-glass: rgba(21, 27, 46, 0.95);
  --bg-glass-elevated: rgba(21, 27, 46, 0.98);
  --text-primary: #e2e8f0;
  --text-strong: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #54B9EE;
  --accent-soft: rgba(84, 185, 238, 0.1);
  --accent-glow: rgba(84, 185, 238, 0.3);
  --brand: #a87dbd;
  --brand-light: #c9a8d8;
  --brand-dark: #7A3C96;
  --brand-gradient: linear-gradient(135deg, #a87dbd 0%, #6ba3d8 50%, #7dcbf5 100%);
  --secondary: #6ba3d8;
  --secondary-light: #9bc4e8;
  --success: #34d399;
  --warning: #fbbf24;
  --border: rgba(168, 125, 189, 0.15);
  --border-glass: rgba(168, 125, 189, 0.2);
  --shadow-primary: 0 10px 40px -15px rgba(168, 125, 189, 0.4);
  --shadow-soft: 0 4px 20px -8px rgba(0, 0, 0, 0.6);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(84, 185, 238, 0.35);
  --blur-light: blur(12px);
  --blur-heavy: blur(20px);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: #ffffff;
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(122, 60, 150, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(84, 185, 238, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

[data-theme="dark"] body {
  background: #0f172a;
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 20% 80%, rgba(168, 125, 189, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(84, 185, 238, 0.06) 0%, transparent 50%);
}

body > * {
  overflow-x: hidden;
}
