
/* Gen-Z & Apple-like UI Design System */

:root {
  /* Core Colors - Apple-like & Gen-Z Vibrancy */
  --bg-primary: #000000; /* Deep black for OLED pop */
  --bg-secondary: #1c1c1e; /* Apple dark gray */
  --accent-primary: #6366f1; /* Indigo */
  --accent-secondary: #ec4899; /* Pink */
  --accent-solid: #6366f1; /* Solid accent color instead of gradient */
  
  /* Text Colors */
  --text-primary: #f5f5f7; /* Apple off-white */
  --text-secondary: #86868b; /* Apple gray */
  --text-tertiary: #6e6e73;

  /* Glassmorphism */
  --glass-bg: rgba(28, 28, 30, 0.65);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 20px;
  --glass-saturate: 180%;

  /* Shapes */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Light Theme Overrides */
body.light-theme {
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Light theme - reduce blob opacity for better readability */
body.light-theme .blob {
  opacity: 0.2;
}

/* Light theme - glass panel hover */
body.light-theme .glass-panel:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.1), var(--shadow-glow);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Light theme - step circles */
body.light-theme .bg-gray-800 {
  background-color: var(--accent-primary) !important;
}

/* Light theme - drop zone */
body.light-theme #drop-zone {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme #drop-zone:hover {
  background: rgba(99, 102, 241, 0.08);
}

/* Light theme - analyzer section */
body.light-theme .bg-gray-900\/30 {
  background: rgba(0, 0, 0, 0.03) !important;
}

/* Light theme - mobile menu */
body.light-theme #mobile-menu {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Light theme - footer */
body.light-theme footer {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.05);
}

/* Light theme - text colors for Tailwind classes */
body.light-theme .text-gray-400,
body.light-theme .text-gray-500 {
  color: var(--text-secondary) !important;
}

body.light-theme .text-white {
  color: var(--text-primary) !important;
}

/* Light theme - border colors */
body.light-theme .border-gray-800\/50,
body.light-theme .border-white\/5,
body.light-theme .border-white\/10 {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle Grid Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

body.light-theme::before {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* Background Blobs Animation */
.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s infinite ease-in-out;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: #6366f1;
  animation-delay: 0s;
}

.blob-2 {
  bottom: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: #ec4899;
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 40%;
  width: 40vw;
  height: 40vw;
  background: #a855f7;
  animation-delay: -10s;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Glass Component */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.glass-panel:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2), var(--shadow-glow);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.gradient-text {
  color: var(--accent-primary);
  display: inline-block;
  font-weight: 800;
}

/* Buttons */
.btn-primary {
  background: var(--accent-primary);
  color: white;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
}

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

/* Header */
header {
  position: sticky;
  top: 20px;
  z-index: 100;
  margin: 0 auto;
  width: 90%;
  max-width: 1200px;
}

.nav-container {
  background: rgba(28, 28, 30, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  gap: 16px;
}

body.light-theme .nav-container {
  background: rgba(255, 255, 255, 0.85);
}

.nav-glass {
  background: rgba(28, 28, 30, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body.light-theme .nav-glass {
  background: rgba(255, 255, 255, 0.8);
}

.nav-link {
  color: var(--text-primary);
  font-weight: 600;
  transition: color 0.2s ease;
  padding: 8px 16px;
  border-radius: var(--radius-full);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

body.light-theme .nav-link:hover {
  background: rgba(0,0,0,0.05);
}

/* Hero Section */
#home {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Features Grid */
.feature-card {
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: white;
  font-size: 24px;
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.25);
}

/* Drop Zone */
#drop-zone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
  transition: all 0.3s ease;
}

#drop-zone:hover, #drop-zone.border-blue-500 {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

/* Theme Toggle */
#theme-button {
  width: 64px;
  height: 32px;
  background: rgba(120, 120, 128, 0.2);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  border: none;
  transition: background 0.3s;
}

#theme-button-slider {
  width: 28px;
  height: 28px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light-theme #theme-button-slider {
  transform: translateX(32px);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Mobile Menu */
#mobile-menu {
  position: absolute;
  top: 80px;
  left: 5%;
  width: 90%;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Terms Animation Wrapper - REMOVED */

/* Modal */
#results-modal .glass-panel {
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 128, 0.3);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(120, 120, 128, 0.5);
}

/* Chrome Extension Section */
.extension-preview {
  position: relative;
}

.browser-frame {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  width: 340px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.browser-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.browser-dots .dot.red { background: #ff5f57; }
.browser-dots .dot.yellow { background: #ffbd2e; }
.browser-dots .dot.green { background: #28c940; }

.browser-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.popup-preview {
  margin: 16px;
  background: #0a0a0b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.popup-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.popup-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  border-left: 3px solid;
}

.risk-preview.high {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #fca5a5;
}

.risk-preview.medium {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #fcd34d;
}

.risk-preview.low {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #86efac;
}

.risk-dot {
  font-size: 10px;
}

/* Light theme adjustments */
body.light-theme .browser-frame {
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

body.light-theme .browser-header {
  background: #f5f5f7;
}

body.light-theme .browser-url {
  background: #e5e5e7;
}

body.light-theme .popup-preview {
  background: #ffffff;
  border-color: #e5e5e7;
}

body.light-theme .popup-header {
  border-color: #e5e5e7;
}
