/* ==========================================================================
   AI Portrait & Headshot Aesthetics Analyzer - Premium CSS Design System
   ========================================================================== */

:root {
  --bg-dark: #090D16;
  --bg-card: rgba(22, 30, 46, 0.7);
  --bg-card-hover: rgba(30, 41, 64, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: rgba(0, 242, 254, 0.15);
  
  --primary-gradient: linear-gradient(135deg, #00F2FE 0%, #4FACFE 100%);
  --accent-purple: linear-gradient(135deg, #A855F7 0%, #6366F1 100%);
  --accent-emerald: linear-gradient(135deg, #10B981 0%, #059669 100%);
  
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --primary-color: #38BDF8;
  --success-color: #10B981;
  --warning-color: #F59E0B;
  --danger-color: #EF4444;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
}

h1, h2, h3, h4, .brand-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

a:hover {
  opacity: 0.85;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFF;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.nav-links a:hover, .nav-links a.active {
  color: #FFF;
  background: rgba(255, 255, 255, 0.05);
}

/* Privacy Badge Header Pill */
.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #34D399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34D399;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #FFFFFF 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 24px;
}

/* Main Analyzer Card Grid */
.analyzer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .analyzer-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
  border-color: #00F2FE;
  background: rgba(0, 242, 254, 0.04);
  box-shadow: 0 0 30px var(--glass-glow);
}

.upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.1);
  color: #00F2FE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.btn-upload {
  background: var(--primary-gradient);
  color: #090D16;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
  transition: var(--transition-fast);
}

.btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.4);
}

.sample-photos-section {
  margin-top: 24px;
  text-align: center;
}

.sample-photos-title {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.sample-thumbs {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.sample-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sample-btn:hover {
  border-color: var(--primary-color);
  color: #FFF;
  background: rgba(0, 242, 254, 0.1);
}

/* Image Preview Box */
.preview-container {
  display: none;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: #000;
  max-height: 420px;
}

.preview-container canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.btn-reset {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(9, 13, 22, 0.8);
  color: #FFF;
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.btn-reset:hover {
  background: var(--danger-color);
}

/* Results Display */
.results-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.results-placeholder {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}

.results-placeholder-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.results-content {
  display: none;
}

/* Score Header Ring */
.score-overview {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--glass-border);
}

.score-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(var(--primary-color) calc(var(--score-pct) * 1%), rgba(255, 255, 255, 0.1) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 30px var(--glass-glow);
}

.score-circle-inner {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-val {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
  color: #FFF;
}

.score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.score-meta h3 {
  font-size: 1.3rem;
  color: #FFF;
  margin-bottom: 4px;
}

.badge-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(0, 242, 254, 0.15);
  color: #00F2FE;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

/* Metric Bars */
.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.metric-name {
  color: var(--text-muted);
  font-weight: 500;
}

.metric-score {
  color: #FFF;
  font-weight: 700;
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary-gradient);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* AI Feedback Box */
.ai-feedback-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.ai-feedback-box h4 {
  font-size: 1rem;
  color: #FFF;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-feedback-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* AdSense Container Placeholder */
.adsense-wrapper {
  margin: 40px 0;
  text-align: center;
}

.adsense-placeholder {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

/* Content Articles Section (Crucial for AdSense approval) */
.articles-section {
  padding: 48px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.2rem;
  color: #FFF;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.article-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #00F2FE;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.article-card h3 {
  font-size: 1.25rem;
  color: #FFF;
  margin-bottom: 12px;
  line-height: 1.4;
}

.article-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.read-more-btn {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Footer */
footer {
  margin-top: auto;
  background: rgba(9, 13, 22, 0.95);
  border-top: 1px solid var(--glass-border);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 360px;
}

.footer-col h4 {
  color: #FFF;
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
