@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #0f172a;
  color: #0f172a;
  --layout-max-width: 1100px;
  --page-gutter: clamp(1rem, 3vw, 2.5rem);

  /* Modern color palette */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 1.25rem var(--page-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.site-footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 3rem var(--page-gutter) 2rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: #60a5fa;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color var(--transition-fast);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
}

.logo {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform var(--transition-fast);
  display: inline-block;
}

.logo:hover {
  transform: scale(1.05);
}

.site-main {
  flex: 1;
  width: min(100%, var(--layout-max-width));
  margin: 0 auto;
  padding: 3rem var(--page-gutter) 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero {
  position: relative;
  text-align: left;
  padding: clamp(2rem, 4vw, 3rem);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.2);
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: #2563eb;
  font-weight: 700;
}

.lead {
  font-size: 1.2rem;
  color: #475569;
  max-width: 620px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.hero-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #475569;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 0;
}

.feature h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.card {
  background: var(--bg-primary);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  width: 100%;
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

.card.hero {
  padding: clamp(2rem, 4vw, 3rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  font-family: inherit;
  min-height: 44px;
  isolation: isolate;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.quota {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
}

.quota strong {
  font-size: 1.35rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: #ecfdf5;
  color: #047857;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 0;
  width: 100%;
}

.album-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.album-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.album-card:hover img {
  transform: scale(1.05);
}

.asset-thumb {
  width: 100%;
  display: block;
  height: auto;
  object-fit: cover;
}

.asset-thumb--pending {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  animation: shimmer 2s infinite;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
}

.asset-empty {
  text-align: center;
  padding: 2rem 0;
}

.paywall {
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(99, 102, 241, 0.15));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: var(--shadow-lg);
}

.paywall h2 {
  margin-top: 0;
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.9rem;
}

.form-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.quick-session-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.quick-session-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
  flex: 1;
  min-width: 220px;
}

.quick-session-form button {
  flex: 0 0 auto;
  min-width: 160px;
}

.upload-status {
  margin-top: 0.75rem;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  display: none;
}

.upload-status--success,
.upload-status--error,
.upload-status--info {
  display: block;
}

.upload-status--success {
  background: #ecfdf5;
  color: #065f46;
}

.upload-status--error {
  background: #fee2e2;
  color: #991b1b;
}

.upload-status--info {
  background: #e0f2fe;
  color: #0c4a6e;
}

.auth-card {
  max-width: 480px;
  margin: 0 auto;
}

.flash-success {
  background: #ecfdf5;
  color: #065f46;
}

.form-stack label {
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
}

.form-stack input {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 1rem;
  width: 100%;
  font-family: inherit;
  background: var(--bg-secondary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fee2e2;
  color: #991b1b;
  margin-bottom: 1rem;
}

.stat {
  background: #f1f5f9;
  padding: 1rem;
  border-radius: 12px;
}

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

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  padding: 1.5rem var(--page-gutter);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  border-top: 2px solid rgba(59, 130, 246, 0.3);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 300px;
}

.cookie-text p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.cookie-text a {
  color: #60a5fa;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-accept {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

.btn-decline {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-decline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* Enhanced Form Inputs */
.form-stack input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Loading Animation */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.loading {
  animation: shimmer 2s infinite;
  background: linear-gradient(to right, #f1f5f9 0%, #e2e8f0 20%, #f1f5f9 40%, #f1f5f9 100%);
  background-size: 1000px 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .site-header {
    padding: 1rem var(--page-gutter);
    justify-content: center;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .site-main {
    padding: 2.5rem var(--page-gutter) 3rem;
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero-meta,
  .cta-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .feature-grid,
  .album-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .cookie-content {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-actions .btn {
    width: 100%;
  }

  .quick-session-form {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-session-form button {
    width: 100%;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Selection Styling */
::selection {
  background: rgba(59, 130, 246, 0.2);
  color: var(--text-primary);
}
