:root {
  --bg-page: #F8FAFC;
  --bg-hero-start: #F0FDFA;
  --bg-hero-end: #F1F5F9;
  --bg-card: #FFFFFF;
  --primary-accent: #0D9488;
  --primary-accent-light: #CCFBF1;
  --text-dark: #1E293B;
  --text-medium: #475569;
  --text-light: #94A3B8;
  --border-color: #E2E8F0;
  --error-bg: #FEF2F2;
  --error-text: #DC2626;
  --warning-bg: #FFFBEB;
  --warning-text: #B45309;
  --success-bg: #ECFDF5;
  --success-text: #065F46;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-medium);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

h2.section-title {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  margin-bottom: 1.25rem;
}

h3.subsection-title {
  font-size: clamp(1rem, 3vw, 1.1rem);
  margin-bottom: 0.75rem;
}

/* Navigation */
.navbar {
  background-color: var(--bg-card);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem clamp(0.75rem, 3vw, 1rem);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo {
  height: 32px;
  width: auto;
}

.brand-name {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1.1rem;
}

/* Navigation Toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 0.25rem;
  z-index: 1002;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-dark);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Navigation Slider */
.nav-slider {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-card);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease-in-out;
  z-index: 1001;
  overflow-y: auto;
}

.nav-slider.active {
  right: 0;
}

.slider-content {
  padding: 1.5rem;
  height: 100%;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.slider-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
}

.slider-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slider-link {
  display: block;
  padding: 1rem;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.slider-link:hover, .slider-link.active {
  background-color: var(--primary-accent-light);
  color: var(--primary-accent);
}

/* Overlay when slider is open */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--bg-hero-start) 0%, var(--bg-hero-end) 100%);
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-text p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  margin-bottom: 2rem;
  color: var(--text-medium);
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.main-card {
  margin-top: -2rem;
  position: relative;
  z-index: 10;
}

/* Centered Form Container */
.centered-form-container {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* Form Elements */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.input-field label {
  font-weight: 500;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}

.input-field input, .input-field select {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s;
  background-color: white;
}

.input-field input:focus, .input-field select:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.input-help {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Input Row */
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Preview Section */
.preview-section {
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: white;
  position: relative;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
}

.preview-header h3 {
  margin: 0;
  color: var(--text-dark);
  font-size: 1rem;
}

.character-count {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
}

.preview-area {
  padding: 1.5rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Age Display */
.age-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
  position: relative;
}

.age-box {
  background: white;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
  border: 2px solid #E2E8F0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.age-box:hover {
  transform: translateY(-5px);
  border-color: var(--primary-accent);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.age-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-accent);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.age-label {
  font-size: 0.9rem;
  color: var(--text-medium);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.total-days {
  background: var(--primary-accent);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  margin: 1.5rem 0;
  font-weight: 600;
}

/* Buttons */
.calculate-button {
  background-color: var(--primary-accent);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  width: 100%;
  position: relative;
}

.calculate-button:hover {
  background-color: #0f766e;
  transform: translateY(-2px);
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background-color: #0f766e;
  transform: translateY(-2px);
}

.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: white;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  text-align: center;
}

.action-button:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

.action-button.secondary {
  background-color: var(--bg-page);
}

.save-button {
  background-color: #3B82F6;
  color: white;
  border: none;
}

.save-button:hover {
  background-color: #2563EB;
  color: white;
}

/* Action Buttons Grid */
.action-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

/* Notices */
.privacy-notice, .disclaimer-box {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.privacy-notice {
  background-color: var(--success-bg);
  border: 1px solid #A7F3D0;
}

.disclaimer-box {
  background-color: var(--warning-bg);
  border: 1px solid #FCD34D;
}

.privacy-title, .disclaimer-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.privacy-title i {
  color: var(--success-text);
}

.disclaimer-title i {
  color: var(--warning-text);
}

.privacy-text, .disclaimer-text {
  font-size: 0.875rem;
  color: var(--text-medium);
  margin: 0;
}

/* How-to Section */
.how-to-section {
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
  background-color: var(--bg-page);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-subtitle {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-medium);
}

.how-to-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.how-to-card {
  background-color: var(--bg-card);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.how-to-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.how-to-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--primary-accent);
  font-size: 1.25rem;
}

.how-to-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.how-to-card p {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.6;
}

/* Content Sections */
.content-section {
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
  background-color: white;
}

.blog-grid, .faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.blog-card, .faq-item {
  background-color: var(--bg-page);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.blog-card h3, .faq-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.blog-card p, .faq-item p {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.6;
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-accent-light);
}

.footer .disclaimer {
  font-size: 0.875rem;
  color: #94A3B8;
  margin-top: 1rem;
}

/* Animations */
.animate-on-load {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Info Icon & Tooltip */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background-color: var(--primary-accent);
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  margin-left: 6px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.info-icon:hover {
  background-color: #0f766e;
  transform: scale(1.1);
}

.tooltip {
  position: absolute;
  background-color: #333;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  width: 250px;
  z-index: 100;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}

.tooltip.active {
  opacity: 1;
  visibility: visible;
}

.tooltip::after {
  content: '';
  position: absolute;
  border-width: 6px;
  border-style: solid;
}

/* Form field tooltips */
.birthdate-tooltip {
  bottom: 100%;
  left: 0;
  margin-bottom: 10px;
}

.birthdate-tooltip::after {
  top: 100%;
  left: 20px;
  border-color: #333 transparent transparent transparent;
}

.target-tooltip {
  bottom: 100%;
  right: 0;
  margin-bottom: 10px;
}

.target-tooltip::after {
  top: 100%;
  right: 20px;
  border-color: #333 transparent transparent transparent;
}

.calculate-tooltip {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  width: 300px;
}

.calculate-tooltip::after {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-color: #333 transparent transparent transparent;
}

/* Age box tooltips - FIXED POSITIONING */
.years-tooltip, .months-tooltip, .days-tooltip, .seconds-tooltip {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  width: 280px;
  z-index: 101;
}

.years-tooltip::after, .months-tooltip::after, .days-tooltip::after, .seconds-tooltip::after {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-color: #333 transparent transparent transparent;
}

/* Additional Components */
.brand-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-link:hover {
  text-decoration: none;
  color: inherit;
}

.info-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 1px solid #E2E8F0;
}

.info-card h4 {
  margin-top: 0;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-card h4 i {
  color: var(--primary-accent);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.use-case-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 1px solid #E2E8F0;
}

.use-case-card h4 {
  margin-top: 0;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.use-case-card h4 i {
  color: var(--primary-accent);
}

.keyword-section {
  background: #f0f9ff;
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
}

.keyword-section h3 {
  margin-top: 0;
  color: #0369a1;
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.keyword-tag {
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

/* Notification */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  background-color: var(--success-bg);
  color: var(--success-text);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateX(150%);
  transition: transform 0.3s ease;
  border: 1px solid #A7F3D0;
}

.notification.show {
  transform: translateX(0);
}

.notification.error {
  background-color: var(--error-bg);
  color: var(--error-text);
  border-color: #FECACA;
}

.notification.warning {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  border-color: #FCD34D;
}

/* Responsive Design */
@media (max-width: 768px) {
  .action-buttons {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    padding: 2rem 1rem;
  }
  
  .main-card {
    margin-top: -1rem;
  }
  
  .how-to-grid, .blog-grid, .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .input-row {
    grid-template-columns: 1fr;
  }
  
  .age-display {
    grid-template-columns: 1fr;
  }
  
  .tooltip {
    width: 280px;
    font-size: 13px;
  }
  
  .birthdate-tooltip, .target-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: 90%;
    max-width: 300px;
  }
  
  .birthdate-tooltip::after, .target-tooltip::after {
    display: none;
  }
  
  .years-tooltip, .months-tooltip, .days-tooltip, .seconds-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: 90%;
    max-width: 300px;
  }
  
  .years-tooltip::after, .months-tooltip::after, .days-tooltip::after, .seconds-tooltip::after {
    display: none;
  }
  
  .age-value {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .nav-slider {
    width: 100%;
  }
  
  .preview-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .character-count {
    align-self: flex-end;
  }
  
  .info-icon {
    width: 16px;
    height: 16px;
    font-size: 10px;
    margin-left: 4px;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.hidden {
  display: none !important;
}