/**
 * Lockless Web - Modern CSS Styles
 * 
 * Beautiful glassmorphism design matching the extension aesthetic.
 * 
 * Authors: Sabih Qureshi (221531), Mehreen Khan (221541)
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Colors */
  --bg-dark: #0a0a1a;
  --bg-gradient: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0f0f23 100%);
  
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.3);
  
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  
  /* Spacing */
  --container-width: 1200px;
  --section-padding: 100px;
  
  /* Animation */
  --transition: 0.3s ease;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   Container
   ============================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
}

.logo-icon {
  font-size: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-nav {
  padding: 10px 20px;
  font-size: 14px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, var(--primary-glow) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.2) 0%, transparent 40%);
  animation: bgPulse 10s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-light);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--glass-border);
}

/* Browser Window Preview */
.hero-visual {
  display: flex;
  justify-content: center;
}

.browser-window {
  width: 100%;
  max-width: 450px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px);
}

.browser-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--glass-border);
}

.browser-dots {
  display: flex;
  gap: 8px;
}

.browser-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glass-border);
}

.browser-dots span:first-child { background: #ef4444; }
.browser-dots span:nth-child(2) { background: #f59e0b; }
.browser-dots span:last-child { background: #10b981; }

.browser-url {
  flex: 1;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.browser-content {
  padding: 24px;
}

.password-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: all var(--transition);
}

.preview-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.preview-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-glow);
  border-radius: 10px;
  font-size: 20px;
}

.preview-info {
  flex: 1;
}

.preview-title {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.preview-dots {
  font-family: monospace;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.preview-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.preview-badge.safe {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

/* ============================================
   Features Section
   ============================================ */
.features {
  padding: var(--section-padding) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-glow);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 16px;
}

.section-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  text-align: center;
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-glow);
  border-radius: 16px;
  font-size: 28px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ============================================
   Security Section
   ============================================ */
.security {
  padding: var(--section-padding) 0;
}

.security-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.security-text .section-badge {
  margin-bottom: 16px;
}

.security-text .section-title {
  text-align: left;
  margin-bottom: 16px;
}

.security-text .section-subtitle {
  text-align: left;
  margin: 0 0 32px 0;
  max-width: none;
}

.security-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.security-item {
  display: flex;
  gap: 16px;
}

.check-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

.security-item strong {
  display: block;
  margin-bottom: 4px;
}

.security-item p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Shield Animation */
.security-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.shield-container {
  position: relative;
  width: 300px;
  height: 300px;
}

.shield {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 24px;
  font-size: 48px;
  box-shadow: 0 20px 40px var(--primary-glow);
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed var(--glass-border);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-1 {
  width: 180px;
  height: 180px;
  animation: orbit 8s linear infinite;
}

.orbit-2 {
  width: 240px;
  height: 240px;
  animation: orbit 12s linear infinite reverse;
}

.orbit-3 {
  width: 300px;
  height: 300px;
  animation: orbit 16s linear infinite;
}

.orbit-dot {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  font-size: 12px;
}

@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   Download Section
   ============================================ */
.download {
  padding: var(--section-padding) 0;
}

.download-card {
  text-align: center;
  padding: 60px;
  background: linear-gradient(135deg, var(--primary-glow) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
}

.download-card h2 {
  font-size: 36px;
  margin-bottom: 16px;
}

.download-card > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 18px;
}

.download-actions {
  margin-bottom: 24px;
}

.btn-chrome {
  font-size: 20px;
}

.download-note {
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-credits {
  text-align: right;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-credits p {
  margin-top: 4px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  :root {
    --section-padding: 60px;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-subtitle {
    max-width: none;
  }
  
  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-visual {
    display: none;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .security-content {
    grid-template-columns: 1fr;
  }
  
  .security-visual {
    order: -1;
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 40px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  /* Navigation - Mobile */
  .navbar {
    padding: 16px 0;
  }
  
  .nav-logo {
    font-size: 20px;
  }
  
  .logo-icon {
    font-size: 24px;
  }
  
  .nav-links a:not(.btn) {
    display: none;
  }
  
  .nav-links {
    gap: 16px;
  }
  
  .btn-nav {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  /* Hero - Mobile */
  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }
  
  .hero-badge {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .hero-title {
    font-size: 32px;
    margin-bottom: 16px;
  }
  
  .hero-subtitle {
    font-size: 15px;
    margin-bottom: 24px;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .btn-lg {
    padding: 14px 24px;
    font-size: 15px;
  }
  
  .hero-stats {
    gap: 16px;
  }
  
  .stat-value {
    font-size: 18px;
  }
  
  .stat-label {
    font-size: 11px;
  }
  
  .stat-divider {
    height: 30px;
  }
  
  /* Features - Mobile */
  .section-header {
    margin-bottom: 32px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .section-subtitle {
    font-size: 15px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .feature-card {
    padding: 24px;
  }
  
  .feature-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
    margin-bottom: 16px;
  }
  
  .feature-card h3 {
    font-size: 18px;
  }
  
  .feature-card p {
    font-size: 14px;
  }
  
  /* Security - Mobile */
  .security-text .section-title {
    text-align: center;
  }
  
  .security-text .section-subtitle {
    text-align: center;
  }
  
  .shield-container {
    width: 200px;
    height: 200px;
  }
  
  .shield {
    width: 80px;
    height: 80px;
    font-size: 32px;
    border-radius: 16px;
  }
  
  .orbit-1 {
    width: 120px;
    height: 120px;
  }
  
  .orbit-2 {
    width: 160px;
    height: 160px;
  }
  
  .orbit-3 {
    width: 200px;
    height: 200px;
  }
  
  /* Download - Mobile */
  .download-card {
    padding: 32px 24px;
    border-radius: 20px;
  }
  
  .download-card h2 {
    font-size: 24px;
  }
  
  .download-card > p {
    font-size: 15px;
  }
  
  /* Footer - Mobile */
  .footer {
    padding: 24px 0;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .footer-links {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .footer-credits {
    text-align: center;
  }
}

/* ============================================
   PWA Install Prompt
   ============================================ */
.pwa-install-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  padding: 16px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 9999;
  animation: slideUp 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-install-banner.hidden {
  display: none;
}

.pwa-install-icon {
  font-size: 32px;
}

.pwa-install-text {
  flex: 1;
}

.pwa-install-text strong {
  display: block;
  margin-bottom: 4px;
}

.pwa-install-text span {
  font-size: 13px;
  color: var(--text-secondary);
}

.pwa-install-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.pwa-install-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

/* Safe area padding for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
  .navbar {
    padding-top: calc(20px + env(safe-area-inset-top));
  }
  
  .footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .btn:active {
    transform: scale(0.98);
  }
  
  .feature-card:hover {
    transform: none;
  }
  
  .preview-item:hover {
    transform: none;
  }
}
