/* Hawaii Fever - Premium Hawaii-inspired design */

:root {
  /* Ocean-inspired palette */
  --ocean-deep: #0a0f1a;
  --ocean-mid: #0f1a2d;
  --ocean-light: #1a2a45;
  --foam: #e8f4f8;
  --aqua: #00d4ff;
  --aqua-dim: #00a8cc;
  --coral: #ff6b6b;
  --sand: #f5f0e8;
  --white: #ffffff;
  
  /* Semantic */
  --bg: var(--ocean-deep);
  --bg-elevated: var(--ocean-mid);
  --bg-surface: var(--ocean-light);
  --text: var(--foam);
  --text-muted: #8899aa;
  --border: rgba(255, 255, 255, 0.08);
  --accent: var(--aqua);
  --accent-glow: rgba(0, 212, 255, 0.3);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  
  /* Typography */
  --font-display: 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', system-ui, sans-serif;
  
  /* Effects */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 40px var(--accent-glow);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 1440px;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 255, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 107, 107, 0.05), transparent);
  pointer-events: none;
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  color: var(--text-muted);
  max-width: 60ch;
}

body.theme-light {
  --bg: #f7fafc;
  --bg-elevated: #ffffff;
  --bg-surface: #edf2f7;
  --text: #0f172a;
  --text-muted: #475569;
  --border: rgba(15, 23, 42, 0.12);
  --accent-glow: rgba(0, 168, 204, 0.15);
}

body.theme-high-contrast {
  --bg: #000000;
  --bg-elevated: #111111;
  --bg-surface: #181818;
  --text: #ffffff;
  --text-muted: #f5f5f5;
  --border: rgba(255, 255, 255, 0.45);
  --accent: #ffe600;
  --accent-glow: rgba(255, 230, 0, 0.35);
}

body.contrast-more {
  --border: rgba(255, 255, 255, 0.25);
}

body.theme-light.contrast-more {
  --border: rgba(15, 23, 42, 0.3);
}

body.font-large {
  font-size: 18px;
}

body.font-extra-large {
  font-size: 20px;
}

a {
  transition: color var(--transition);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.logo-mark {
  font-size: 1.75rem;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-text {
  font-size: 1.375rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: var(--space-sm) 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--white);
}

.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--ocean-deep);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--white);
  border-color: var(--text-muted);
}

/* Main */
.main {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  min-height: calc(100vh - 200px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  margin-top: var(--space-2xl);
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer p {
  font-size: 0.875rem;
}

.footer-nav {
  display: flex;
  gap: var(--space-lg);
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .nav { display: none; }
  .header-inner { padding: var(--space-sm) var(--space-md); }
  .main { padding: var(--space-lg) var(--space-md); }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* Utility classes for Pico override */
article {
  background: transparent;
  border: none;
}

input, textarea, select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

label {
  color: var(--text-muted);
}

/* Card component */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition);
}

.card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-sm);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-left {
  text-align: left;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.page-intro {
  margin-bottom: var(--space-xl);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  margin: 0 0 var(--space-2xl);
}

.metric-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.metric-card small {
  display: block;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.metric-card strong {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.map-shell {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
}

.events-map {
  width: 100%;
  min-height: 360px;
}

.event-bucket {
  margin-bottom: var(--space-2xl);
}

.event-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.event-card {
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.event-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-surface);
}

.event-card-body {
  padding: var(--space-lg);
}

.event-card-body h3 {
  margin: 0.4rem 0 0.5rem;
}

.event-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.event-chip {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.12);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.settings-card,
.callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.callout-success {
  border-color: rgba(34, 197, 94, 0.45);
}

.validation-summary {
  margin-bottom: var(--space-md);
  color: var(--coral);
}

.validation-summary ul {
  margin: 0;
  padding-left: 1.2rem;
}

.event-form-grid {
  display: grid;
  gap: var(--space-lg);
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.form-field {
  display: grid;
  gap: var(--space-sm);
}

.field-header,
.field-footer,
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.field-help {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-lead {
  margin-top: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.current-image-card img {
  width: min(100%, 320px);
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
}

.hf-card,
.hf-filter,
.hf-metric,
.hf-bulk-actions {
  background: var(--bg-elevated) !important;
  border-color: var(--border) !important;
}

.hf-meta div {
  background: var(--bg-surface) !important;
  border-color: var(--border) !important;
}

.hf-status-pending {
  background: rgba(234, 179, 8, 0.18);
}

.hf-status-approved {
  background: rgba(34, 197, 94, 0.18);
}

.hf-status-rejected {
  background: rgba(239, 68, 68, 0.18);
}

/* Hero section */
.hero {
  padding: var(--space-2xl) 0;
}

.hero h1 {
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--white) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  margin: 0 auto var(--space-xl);
}

/* Form styling for auth */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: var(--space-lg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-header h2 {
  margin-bottom: var(--space-sm);
}

.auth-form input {
  width: 100%;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.auth-form button {
  width: 100%;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero, .auth-page, .card {
  animation: fadeInUp 0.5s ease-out;
}

@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .metrics-grid,
  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .events-map {
    min-height: 300px;
  }

  .hero {
    padding: var(--space-xl) 0;
  }

  .hero-actions,
  .field-header,
  .field-footer,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
