:root {
  --bg-dark: #0f172a;
  --bg-mid: #1e293b;
  --card-bg: rgba(30, 41, 59, 0.8);
  --card-border: rgba(148, 163, 184, 0.1);
  --input-bg: rgba(15, 23, 42, 0.6);
  --input-border: rgba(148, 163, 184, 0.2);
  --primary: #6366f1;
  --primary-light: #8b5cf6;
  --accent: #a78bfa;
  --text-white: #ffffff;
  --text-muted: #94a3b8;
  --text-slate: #cbd5e1;
  --divider: rgba(148, 163, 184, 0.15);
  --error-bg: rgba(239, 68, 68, 0.15);
  --error-border: rgba(239, 68, 68, 0.3);
  --error-text: #fca5a5;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.page-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 50%, var(--bg-dark) 100%);
}

.container {
  width: 100%;
  max-width: 28rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.025em;
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.card {
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
}

.result-card {
  margin-top: 1.5rem;
}

.input-label {
  display: block;
  color: var(--text-slate);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.input-row {
  display: flex;
  gap: 0.75rem;
}

.date-input {
  flex: 1;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-white);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
}

.date-input:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

.date-input::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
}

.calc-button {
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  color: var(--text-white);
  font-size: 0.875rem;
  transition: all 0.2s;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
}

.calc-button:hover {
  transform: scale(1.05);
}

.calc-button:active {
  transform: scale(0.95);
}

.age-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.age-block {
  text-align: center;
  flex: 1;
}

.age-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.age-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.divider {
  height: 1px;
  background: var(--divider);
  margin-bottom: 1.25rem;
}

.details-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.detail-value {
  color: var(--text-white);
  font-weight: 600;
}

.detail-value-accent {
  color: var(--accent);
}

.error-card {
  margin-top: 1.5rem;
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
}

.error-text {
  color: var(--error-text);
  font-size: 0.875rem;
}