/*
 * Modern Professional Legal Hub
 * A refined, editorial design with distinctive typography
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   CSS CUSTOM PROPERTIES - THEMING SYSTEM
   ========================================================================== */

:root {
  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --transition-fast: 150ms var(--ease-out-quart);
  --transition-base: 250ms var(--ease-out-expo);
  --transition-slow: 400ms var(--ease-out-expo);
  --transition-slower: 600ms var(--ease-out-expo);
}

/* --------------------------------------------------------------------------
   BLUE THEME (Default) - Corporate Professional
   -------------------------------------------------------------------------- */
[data-theme="blue"],
:root:not([data-theme]) {
  --primary-color: #1e40af;
  --primary-hover: #1e3a8a;
  --primary-light: #dbeafe;
  --primary-glow: rgba(30, 64, 175, 0.15);
  --accent-color: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-glow: rgba(14, 165, 233, 0.2);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-gradient-start: #f8fafc;
  --bg-gradient-end: #e2e8f0;
  --bg-hero: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #dbeafe 100%);

  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: var(--primary-color);

  --shadow-color: 215 28% 17%;
  --shadow-xs: 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-sm: 0 2px 4px hsl(var(--shadow-color) / 0.06), 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-md: 0 4px 8px hsl(var(--shadow-color) / 0.08), 0 2px 4px hsl(var(--shadow-color) / 0.04);
  --shadow-lg: 0 12px 24px hsl(var(--shadow-color) / 0.1), 0 4px 8px hsl(var(--shadow-color) / 0.05);
  --shadow-xl: 0 20px 40px hsl(var(--shadow-color) / 0.12), 0 8px 16px hsl(var(--shadow-color) / 0.06);
  --shadow-glow: 0 0 40px var(--primary-glow);

  --header-bg: rgba(255, 255, 255, 0.85);
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
}

/* --------------------------------------------------------------------------
   DARK THEME - Elegant Night Mode
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --primary-color: #60a5fa;
  --primary-hover: #93c5fd;
  --primary-light: #1e3a5f;
  --primary-glow: rgba(96, 165, 250, 0.2);
  --accent-color: #a78bfa;
  --accent-hover: #c4b5fd;
  --accent-glow: rgba(167, 139, 250, 0.25);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-elevated: #1e293b;
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e293b;
  --bg-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #172554 100%);

  --border-color: #334155;
  --border-hover: #475569;
  --border-focus: var(--primary-color);

  --shadow-color: 222 47% 5%;
  --shadow-xs: 0 1px 2px hsl(var(--shadow-color) / 0.3);
  --shadow-sm: 0 2px 4px hsl(var(--shadow-color) / 0.4), 0 1px 2px hsl(var(--shadow-color) / 0.3);
  --shadow-md: 0 4px 8px hsl(var(--shadow-color) / 0.5), 0 2px 4px hsl(var(--shadow-color) / 0.4);
  --shadow-lg: 0 12px 24px hsl(var(--shadow-color) / 0.6), 0 4px 8px hsl(var(--shadow-color) / 0.5);
  --shadow-xl: 0 20px 40px hsl(var(--shadow-color) / 0.7), 0 8px 16px hsl(var(--shadow-color) / 0.5);
  --shadow-glow: 0 0 60px var(--primary-glow);

  --header-bg: rgba(15, 23, 42, 0.9);
  --card-bg: #1e293b;
  --card-border: #334155;
}

/* --------------------------------------------------------------------------
   GREEN THEME - Natural & Fresh
   -------------------------------------------------------------------------- */
[data-theme="green"] {
  --primary-color: #059669;
  --primary-hover: #047857;
  --primary-light: #d1fae5;
  --primary-glow: rgba(5, 150, 105, 0.15);
  --accent-color: #34d399;
  --accent-hover: #10b981;
  --accent-glow: rgba(52, 211, 153, 0.2);

  --text-primary: #022c22;
  --text-secondary: #064e3b;
  --text-muted: #4b5563;
  --text-inverse: #ffffff;

  --bg-primary: #ffffff;
  --bg-secondary: #f0fdf4;
  --bg-tertiary: #dcfce7;
  --bg-elevated: #ffffff;
  --bg-gradient-start: #f0fdf4;
  --bg-gradient-end: #d1fae5;
  --bg-hero: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 50%, #a7f3d0 100%);

  --border-color: #bbf7d0;
  --border-hover: #86efac;
  --border-focus: var(--primary-color);

  --shadow-color: 160 84% 18%;
  --shadow-xs: 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-sm: 0 2px 4px hsl(var(--shadow-color) / 0.06), 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-md: 0 4px 8px hsl(var(--shadow-color) / 0.08), 0 2px 4px hsl(var(--shadow-color) / 0.04);
  --shadow-lg: 0 12px 24px hsl(var(--shadow-color) / 0.1), 0 4px 8px hsl(var(--shadow-color) / 0.05);
  --shadow-xl: 0 20px 40px hsl(var(--shadow-color) / 0.12), 0 8px 16px hsl(var(--shadow-color) / 0.06);
  --shadow-glow: 0 0 40px var(--primary-glow);

  --header-bg: rgba(255, 255, 255, 0.85);
  --card-bg: #ffffff;
  --card-border: #bbf7d0;
}

/* --------------------------------------------------------------------------
   PURPLE THEME - Creative & Bold
   -------------------------------------------------------------------------- */
[data-theme="purple"] {
  --primary-color: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-light: #ede9fe;
  --primary-glow: rgba(124, 58, 237, 0.15);
  --accent-color: #c084fc;
  --accent-hover: #a855f7;
  --accent-glow: rgba(192, 132, 252, 0.2);

  --text-primary: #1e1b4b;
  --text-secondary: #3730a3;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;

  --bg-primary: #ffffff;
  --bg-secondary: #faf5ff;
  --bg-tertiary: #f3e8ff;
  --bg-elevated: #ffffff;
  --bg-gradient-start: #faf5ff;
  --bg-gradient-end: #ede9fe;
  --bg-hero: linear-gradient(135deg, #faf5ff 0%, #ede9fe 50%, #ddd6fe 100%);

  --border-color: #e9d5ff;
  --border-hover: #d8b4fe;
  --border-focus: var(--primary-color);

  --shadow-color: 263 70% 50%;
  --shadow-xs: 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-sm: 0 2px 4px hsl(var(--shadow-color) / 0.06), 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-md: 0 4px 8px hsl(var(--shadow-color) / 0.08), 0 2px 4px hsl(var(--shadow-color) / 0.04);
  --shadow-lg: 0 12px 24px hsl(var(--shadow-color) / 0.1), 0 4px 8px hsl(var(--shadow-color) / 0.05);
  --shadow-xl: 0 20px 40px hsl(var(--shadow-color) / 0.12), 0 8px 16px hsl(var(--shadow-color) / 0.06);
  --shadow-glow: 0 0 40px var(--primary-glow);

  --header-bg: rgba(255, 255, 255, 0.85);
  --card-bg: #ffffff;
  --card-border: #e9d5ff;
}

/* --------------------------------------------------------------------------
   OCEAN THEME - Calm & Serene
   -------------------------------------------------------------------------- */
[data-theme="ocean"] {
  --primary-color: #0891b2;
  --primary-hover: #0e7490;
  --primary-light: #cffafe;
  --primary-glow: rgba(8, 145, 178, 0.15);
  --accent-color: #22d3ee;
  --accent-hover: #06b6d4;
  --accent-glow: rgba(34, 211, 238, 0.2);

  --text-primary: #083344;
  --text-secondary: #155e75;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --bg-primary: #ffffff;
  --bg-secondary: #ecfeff;
  --bg-tertiary: #cffafe;
  --bg-elevated: #ffffff;
  --bg-gradient-start: #ecfeff;
  --bg-gradient-end: #a5f3fc;
  --bg-hero: linear-gradient(135deg, #ecfeff 0%, #cffafe 50%, #a5f3fc 100%);

  --border-color: #a5f3fc;
  --border-hover: #67e8f9;
  --border-focus: var(--primary-color);

  --shadow-color: 192 91% 36%;
  --shadow-xs: 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-sm: 0 2px 4px hsl(var(--shadow-color) / 0.06), 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-md: 0 4px 8px hsl(var(--shadow-color) / 0.08), 0 2px 4px hsl(var(--shadow-color) / 0.04);
  --shadow-lg: 0 12px 24px hsl(var(--shadow-color) / 0.1), 0 4px 8px hsl(var(--shadow-color) / 0.05);
  --shadow-xl: 0 20px 40px hsl(var(--shadow-color) / 0.12), 0 8px 16px hsl(var(--shadow-color) / 0.06);
  --shadow-glow: 0 0 40px var(--primary-glow);

  --header-bg: rgba(255, 255, 255, 0.85);
  --card-bg: #ffffff;
  --card-border: #a5f3fc;
}

/* --------------------------------------------------------------------------
   SUNSET THEME - Warm & Energetic
   -------------------------------------------------------------------------- */
[data-theme="sunset"] {
  --primary-color: #ea580c;
  --primary-hover: #c2410c;
  --primary-light: #ffedd5;
  --primary-glow: rgba(234, 88, 12, 0.15);
  --accent-color: #fb923c;
  --accent-hover: #f97316;
  --accent-glow: rgba(251, 146, 60, 0.2);

  --text-primary: #431407;
  --text-secondary: #7c2d12;
  --text-muted: #78716c;
  --text-inverse: #ffffff;

  --bg-primary: #ffffff;
  --bg-secondary: #fffbeb;
  --bg-tertiary: #fef3c7;
  --bg-elevated: #ffffff;
  --bg-gradient-start: #fffbeb;
  --bg-gradient-end: #fed7aa;
  --bg-hero: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);

  --border-color: #fed7aa;
  --border-hover: #fdba74;
  --border-focus: var(--primary-color);

  --shadow-color: 24 95% 53%;
  --shadow-xs: 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-sm: 0 2px 4px hsl(var(--shadow-color) / 0.06), 0 1px 2px hsl(var(--shadow-color) / 0.04);
  --shadow-md: 0 4px 8px hsl(var(--shadow-color) / 0.08), 0 2px 4px hsl(var(--shadow-color) / 0.04);
  --shadow-lg: 0 12px 24px hsl(var(--shadow-color) / 0.1), 0 4px 8px hsl(var(--shadow-color) / 0.05);
  --shadow-xl: 0 20px 40px hsl(var(--shadow-color) / 0.12), 0 8px 16px hsl(var(--shadow-color) / 0.06);
  --shadow-glow: 0 0 40px var(--primary-glow);

  --header-bg: rgba(255, 255, 255, 0.85);
  --card-bg: #ffffff;
  --card-border: #fed7aa;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-hero);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Selection styling */
::selection {
  background: var(--primary-light);
  color: var(--text-primary);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition-base), background var(--transition-base);
}

.header:hover {
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

/* Brand */
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-base);
  display: inline-block;
  position: relative;
}

.brand-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-base);
}

.brand-link:hover {
  color: var(--primary-color);
}

.brand-link:hover::after {
  width: 100%;
}

/* Navigation */
.nav {
  display: flex;
  gap: var(--space-2xl);
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  transition: all var(--transition-base);
  position: relative;
  padding: var(--space-sm) 0;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-base);
  transform: translateX(-50%);
  border-radius: var(--radius-full);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::before {
  width: 100%;
}

/* Burger Menu */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1001;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  gap: 5px;
}

.burger-menu:hover {
  background: var(--bg-tertiary);
}

.burger-line {
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  transform-origin: center;
}

.burger-menu.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger-menu.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  max-width: 550px;
}

.search-container {
  flex: 1;
  max-width: 220px;
}

.search-input {
  width: 100%;
  padding: 0.625rem var(--space-md);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: all var(--transition-base);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background-color: var(--bg-primary);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.dropdown-container,
.theme-selector-container {
  max-width: 160px;
}

.app-dropdown,
.theme-selector {
  width: 100%;
  padding: 0.625rem var(--space-md);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  font-weight: 500;
}

.app-dropdown:focus,
.theme-selector:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.app-dropdown:hover,
.theme-selector:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-secondary);
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */

.main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-xl);
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl) var(--space-md);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

.loading::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--space-md);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   PAGE HEADERS
   ========================================================================== */

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  animation: fadeInUp 0.6s var(--ease-out-expo) both;
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3xl);
  font-weight: 400;
  line-height: 1.7;
  max-width: 560px;
  animation: fadeInUp 0.6s var(--ease-out-expo) 0.1s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   APP CARDS GRID
   ========================================================================== */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-xl);
  animation: fadeIn 0.5s var(--ease-out-expo) 0.2s both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.app-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.app-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.app-card:hover::before {
  transform: scaleX(1);
}

.app-card:hover::after {
  opacity: 1;
}

.app-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: color var(--transition-base);
  position: relative;
  z-index: 1;
}

.app-card:hover .app-card-title {
  color: var(--primary-color);
}

.app-card-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: 0.9375rem;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.app-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

.app-card-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-card-meta-label {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   APP DETAIL PAGE
   ========================================================================== */

.app-detail {
  animation: fadeInUp 0.5s var(--ease-out-expo) both;
}

.app-detail-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 2px solid var(--border-color);
}

.app-detail-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
}

.app-detail-description {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 700px;
}

.app-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.app-detail-meta-item {
  background: var(--bg-secondary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.app-detail-meta-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}

.app-detail-meta-label {
  font-weight: 600;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.app-detail-meta-value {
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.5;
  font-weight: 500;
}

/* ==========================================================================
   POLICY LINKS
   ========================================================================== */

.policy-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.policy-link-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.policy-link-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-color);
  transform: scaleY(0);
  transition: transform var(--transition-base);
  border-radius: var(--radius-full);
}

.policy-link-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  background: var(--bg-secondary);
}

.policy-link-card:hover::before {
  transform: scaleY(1);
}

.policy-link-title {
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-size: 1rem;
  color: var(--text-primary);
  transition: color var(--transition-base);
}

.policy-link-card:hover .policy-link-title {
  color: var(--primary-color);
}

.policy-link-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   POLICY CONTENT
   ========================================================================== */

.policy-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.5s var(--ease-out-expo) 0.1s both;
}

.policy-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.policy-header::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
}

.policy-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
}

.policy-last-updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.policy-last-updated::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
}

.policy-section {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-color);
}

.policy-section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.policy-section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.policy-section-content {
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
  font-size: 1rem;
}

.content-list {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
  color: var(--text-secondary);
  line-height: 1.8;
}

.content-list li {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-xs);
}

.content-list li:last-child {
  margin-bottom: 0;
}

/* Q&A Formatting */
.qa-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.qa-item {
  padding: var(--space-md);
  background: var(--surface-color);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary-color);
}

.qa-question {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.qa-answer {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   NAVIGATION ELEMENTS
   ========================================================================== */

.policy-navigation {
  margin-bottom: var(--space-xl);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition-base);
  padding: var(--space-sm) 0;
}

.back-link:hover {
  color: var(--primary-hover);
  transform: translateX(-4px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  animation: fadeIn 0.4s var(--ease-out-expo) both;
}

.breadcrumb-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-base);
  font-weight: 500;
}

.breadcrumb-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--border-color);
  font-weight: 300;
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   URL DISPLAY & COPY
   ========================================================================== */

.url-display {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-2xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  animation: fadeIn 0.5s var(--ease-out-expo) 0.3s both;
}

.url-display-label {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.url-display-value {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-primary);
  word-break: break-all;
  background: var(--bg-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.copy-button {
  padding: var(--space-sm) var(--space-lg);
  background: var(--primary-color);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.copy-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.copy-button:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================================
   NOT FOUND PAGE
   ========================================================================== */

.not-found {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  animation: fadeInUp 0.5s var(--ease-out-expo) both;
}

.not-found-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.not-found-message {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  line-height: 1.6;
}

.not-found-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--primary-color);
  color: var(--text-inverse);
  text-decoration: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.not-found-link:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   EMAIL CONFIRMATION PAGE
   ========================================================================== */

.email-confirm-container {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  animation: fadeInUp 0.5s var(--ease-out-expo) both;
}

.email-confirm-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-xl);
  font-size: 2.5rem;
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow);
  animation: scaleIn 0.5s var(--ease-out-expo) 0.2s both;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.email-confirm-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.email-confirm-message {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.email-confirm-submessage {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.email-confirm-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--primary-color);
  color: var(--text-inverse);
  text-decoration: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.email-confirm-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .email-confirm-container {
    padding: var(--space-2xl) var(--space-md);
  }

  .email-confirm-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }

  .email-confirm-submessage {
    padding: 0 var(--space-sm);
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-2xl) var(--space-xl);
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.disclaimer {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-style: italic;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.footer-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color var(--transition-base);
}

.footer-link:hover {
  color: var(--primary-hover);
}

.json-ld {
  display: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --header-height: 72px;
  }

  .header-container {
    padding: 0 var(--space-lg);
    gap: var(--space-lg);
  }

  .main {
    padding: var(--space-2xl) var(--space-lg);
  }

  .apps-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .policy-links {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .header-container {
    padding: 0 var(--space-md);
    gap: var(--space-md);
  }

  .brand {
    font-size: 1.25rem;
  }

  .burger-menu {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all var(--transition-slow);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    box-shadow: none;
  }

  .nav.active {
    max-height: 300px;
    opacity: 1;
    box-shadow: var(--shadow-lg);
  }

  .nav-link {
    font-size: 1rem;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-link::before {
    display: none;
  }

  .nav-link:hover {
    background: var(--bg-secondary);
  }

  .header-actions {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all var(--transition-slow);
    z-index: 998;
    max-width: 100%;
  }

  .header-actions.active {
    max-height: 400px;
    opacity: 1;
    box-shadow: var(--shadow-lg);
  }

  .search-container,
  .dropdown-container,
  .theme-selector-container {
    max-width: 100%;
  }

  .main {
    padding: var(--space-xl) var(--space-md);
  }

  .page-subtitle {
    margin-bottom: var(--space-xl);
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .app-card {
    padding: var(--space-lg);
  }

  .app-card-meta {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .app-detail-meta {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .policy-links {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .policy-content {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .policy-header {
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-lg);
  }

  .policy-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
  }

  .url-display {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
    margin-top: var(--space-xl);
  }

  .copy-button {
    width: 100%;
    text-align: center;
    padding: var(--space-md);
  }

  .not-found {
    padding: var(--space-2xl) var(--space-md);
  }

  .footer {
    padding: var(--space-xl) var(--space-md);
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .brand {
    font-size: 1.125rem;
  }

  .app-card {
    padding: var(--space-md);
  }

  .app-card-title {
    font-size: 1.25rem;
  }

  .policy-content {
    padding: var(--space-md);
  }

  .policy-section-title {
    font-size: 1.125rem;
  }

  .policy-section-content {
    font-size: 0.9375rem;
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Visible for Accessibility */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
