@view-transition {
  navigation: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* HEADER */

.header {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.15);
}

.site-logo-link {
  text-decoration: none;
}

.main-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.logo-text-main {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
}

.logo-text-sub {
  color: #d1fae5;
  font-size: 0.8rem;
}

/* Desktop nav */

.nav-links.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-block;
}

.nav-link:hover {
  color: #e5e7eb;
  transform: translateY(-1px);
}

/* Dropdown */

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
}

.dropdown-content {
  position: absolute;
  top: 120%;
  right: 0;
  min-width: 230px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  padding: 6px 0;
  display: none;
  z-index: 1100;
}

.dropdown-content.open {
  display: block;
}

.dropdown-content a {
  color: #4a5568;
  padding: 10px 18px;
  font-size: 0.9rem;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  padding-left: 26px;
}

/* Mobile menu */

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.7rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: #047857;
  z-index: 999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  display: block;
  max-height: 500px;
}

.mobile-menu a {
  display: block;
  padding: 12px 24px;
  color: #ecfdf5;
  text-decoration: none;
  border-bottom: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 500;
}

.mobile-menu a:hover {
  background: rgba(16, 185, 129, 0.25);
}

/* Overlay for closing mobile menu */

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 900;
}

.mobile-overlay.show {
  display: block;
}

/* PAGE HEADER */

.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 80px 20px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'><path d='M0,0 Q300,60 600,30 T1200,0 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.05)'/></svg>") repeat-x bottom;
  background-size: 1200px 120px;
  opacity: 0.3;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.25);
  animation: slideInDown 0.6s ease;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.96;
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  animation: slideInUp 0.6s ease;
}

/* LAYOUT */

.calculator-container {
  max-width: 1400px;
  margin: -60px auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.calculator-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.6s ease;
}

/* TITLES */

.card-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #4f46e5;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* TABS */

.tab-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 12px;
}

.tab-btn {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.tab-btn:hover:not(.active) {
  background: #e2e8f0;
}

.tab-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* FORM INPUTS */

.input-section {
  margin-bottom: 22px;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1f2933;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid #cbd5e0;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.input-field:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.input-prefix,
.input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  color: #4a5568;
  font-size: 1rem;
  pointer-events: none;
}

.input-prefix {
  left: 18px;
}

.input-suffix {
  right: 18px;
}

.input-field.with-prefix {
  padding-left: 48px;
}

.input-field.with-suffix {
  padding-right: 80px;
}

/* sliders */

.slider-container {
  margin-top: 10px;
}

.slider {
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(to right, #667eea 0%, #764ba2 100%);
  outline: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Checkbox */

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.checkbox-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.95rem;
  color: #4a5568;
  cursor: pointer;
}

/* Button */

.calculate-btn {
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: all 0.25s ease;
}

.calculate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

.calculate-btn:active {
  transform: scale(0.98);
}

/* RESULTS */

.results-section {
  display: none;
}

.results-section.show {
  display: block;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.result-box {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
  padding: 18px 20px;
  border-radius: 16px;
  border-left: 4px solid #667eea;
  transition: all 0.25s ease;
}

.result-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.18);
}

.result-box.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  grid-column: 1 / -1;
}

.result-box.highlight .result-label {
  color: rgba(255, 255, 255, 0.9);
}

.result-box.highlight .result-value {
  color: #ffffff;
  font-size: 2.1rem;
}

.result-box.highlight .result-subtext {
  color: rgba(255, 255, 255, 0.82);
}

.result-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}

.result-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #4f46e5;
}

.result-subtext {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

/* CHARTS */

.chart-container {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.chart-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2933;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-chart {
  width: 260px;
  height: 260px;
  margin: 0 auto;
  position: relative;
}

.donut-chart svg {
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-center-label {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 4px;
}

.donut-center-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #4f46e5;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.legend-text {
  font-size: 0.85rem;
  color: #4b5563;
  font-weight: 600;
}

.legend-value {
  font-size: 0.85rem;
  color: #4f46e5;
  font-weight: 700;
}

/* Stats */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 10px;
}

.stat-item {
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}

.stat-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #4f46e5;
}

/* Yearly breakdown */

.year-breakdown {
  margin-top: 16px;
  max-height: 380px;
  overflow-y: auto;
}

.year-item {
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 90px 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  border: 2px solid #e2e8f0;
  transition: all 0.25s ease;
}

.year-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
}

.year-label {
  font-weight: 700;
  color: #4f46e5;
  font-size: 0.9rem;
}

.year-value {
  text-align: center;
}

.year-value-label {
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 2px;
}

.year-value-amount {
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
}

/* Download buttons */

.download-buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.download-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Info cards */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 36px;
}

.info-card {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  border-left: 4px solid #667eea;
  transition: all 0.25s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 26px rgba(102,126,234,0.28);
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-card p {
  font-size: 0.93rem;
  color: #4b5563;
  line-height: 1.7;
}

.info-card a {
  color: #2563eb;
  text-decoration: underline;
}

.info-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
}

/* BLOG SECTION */

.blog-section {
  max-width: 900px;
  margin: 70px auto;
  padding: 0 20px;
}

.blog-content {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 34px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  line-height: 1.8;
}

.blog-content h2 {
  font-size: 2.1rem;
  font-weight: 900;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin-top: 26px;
  margin-bottom: 10px;
}

.blog-content p {
  font-size: 0.98rem;
  color: #4b5563;
  margin-bottom: 12px;
}

.blog-content ul {
  margin-left: 24px;
  margin-bottom: 10px;
  color: #4b5563;
}

.blog-content li {
  margin-bottom: 6px;
}

.blog-content a {
  color: #2563eb;
  text-decoration: underline;
}

/* FAQ SECTION */

.faq-section {
  max-width: 900px;
  margin: 0 auto 80px;
  padding: 0 20px;
}

.faq-container {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.faq-heading {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 18px;
  color: #111827;
}

.faq-item + .faq-item {
  margin-top: 14px;
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2933;
  margin-bottom: 4px;
}

.faq-item p {
  font-size: 0.94rem;
  color: #4b5563;
}

/* FOOTER */

.footer {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: #ffffff;
  padding: 60px 0 20px;
  margin-top: 60px;
}

.footer-column h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column a {
  color: #cbd5e0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.footer-column a:hover {
  color: #14b8a6;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 32px;
  padding-top: 20px;
  text-align: center;
  color: #a0aec0;
  font-size: 0.85rem;
}

/* ANIMATIONS */

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* RESPONSIVE */

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }

  .mobile-menu-btn {
    display: block;
  }

  .page-header h1 {
    font-size: 36px;
  }

  .page-header p {
    font-size: 18px;
  }

  .calculator-card {
    padding: 24px;
  }

  .input-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .blog-content {
    padding: 32px 24px;
  }

  .blog-content h2 {
    font-size: 32px;
  }

  .blog-content h3 {
    font-size: 24px;
  }

  .download-buttons {
    flex-direction: column;
  }

  .gpa-value {
    font-size: 56px;
  }

  .course-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .remove-btn {
    width: 100%;
  }

  .calculator-container {
    margin: -40px auto 40px;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .blog-content {
    padding: 24px 18px;
  }

  .faq-inner {
    padding: 28px 20px;
  }
}

/* ============= Animations ============= */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes mobileMenuSlide {
    from {
        opacity: 0;
        transform: scaleY(0.9);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}