/* ============================================
   SHARED STYLES - Age Calculator Project
   Global base styles, typography, gradients
   ============================================ */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea, #764ba2);
  --primary-color: #764ba2;
  --accent-color: #ffd700;
  --text-color: #fff;
  --text-muted: rgba(255, 255, 255, 0.8);
  --border-color: rgba(255, 255, 255, 0.2);
  --bg-dark: rgba(255, 255, 255, 0.1);
  --bg-darker: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.3);
  --transition-base: all 0.3s ease;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--primary-gradient);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

h2 {
  font-size: clamp(1.25rem, 4vw, 2rem);
}

p {
  margin: 0.5rem 0;
  opacity: 0.95;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--text-color);
  text-decoration: underline;
}

/* Form Elements */
input, select, textarea {
  font-family: inherit;
  font-size: 16px; /* Prevents iOS zoom on focus */
}

input[type="date"],
input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  transition: var(--transition-base);
}

input[type="date"]:focus,
input[type="number"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-color);
}

button {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  transition: var(--transition-base);
  background: var(--text-color);
  color: var(--primary-color);
}

button:hover {
  background: var(--primary-color);
  color: var(--text-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(0);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-30 { margin-top: 30px; }
.mb-30 { margin-bottom: 30px; }

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-lg {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Visible (better keyboard navigation) */
*:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }

  body {
    padding: 0;
  }

  input, button {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

