@view-transition {
  navigation: auto;
}

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

html {
  height: 100%;
  scroll-behavior: smooth;
}

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

/* Header */

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

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

.site-title-link {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.site-title-link:hover {
  text-decoration: underline;
}

.site-subtitle {
  margin: 0;
  margin-top: 2px;
  font-size: 0.8rem;
  color: #e5e7eb;
}

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

.nav-link:hover {
  color: #e5e7eb;
  transform: scale(1.05);
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.dropdown-toggle:hover {
  color: #e5e7eb;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 120%;
  right: 0;
  background: #ffffff;
  min-width: 220px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border-radius: 12px;
  margin-top: 4px;
  overflow: hidden;
}

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

.dropdown-content a {
  color: #4a5568;
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  font-size: 14px;
}

.dropdown-content a:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding-left: 28px;
}

/* Mobile menu */

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

.mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  z-index: 999;
}

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

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 10px 18px 18px;
}

.mobile-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-menu li:last-child {
  border-bottom: none;
}

.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: #f9fafb;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.mobile-menu a:hover {
  color: #bbf7d0;
}

/* Page header */

.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 80px 20px 90px;
  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.1)'/></svg>") repeat-x bottom;
  background-size: 1200px 120px;
  opacity: 0.3;
}

.header-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

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

.page-header p {
  font-size: 20px;
  position: relative;
  z-index: 1;
  animation: slideInUp 0.6s ease;
}

/* Animations */

@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) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(3deg); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Calculator layout */

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

.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;
  margin-bottom: 24px;
}

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

.card-title {
  font-size: 28px;
  font-weight: 800;
  color: #764ba2;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.input-group {
  background: linear-gradient(135deg, #f3f4ff 0%, #e9e4f0 100%);
  padding: 16px;
  border-radius: 12px;
  border: 2px solid #667eea;
  transition: all 0.3s ease;
}

.input-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.input-label {
  font-weight: 700;
  color: #4c1d95;
  margin-bottom: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field,
.select-field {
  width: 100%;
  padding: 12px;
  border: 2px solid #667eea;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  color: #1e293b;
  background: #ffffff;
}

.input-field:focus,
.select-field:focus {
  outline: none;
  border-color: #764ba2;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: scale(1.02);
}

.add-course-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 16px;
}

.add-course-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.calculate-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 24px;
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Courses list */

.courses-list {
  margin-top: 24px;
}

.courses-heading {
  margin-bottom: 16px;
  font-weight: 700;
  color: #4c1d95;
  font-size: 18px;
}

.course-item {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.course-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.course-name {
  font-weight: 700;
  color: #4c1d95;
  font-size: 16px;
  margin-bottom: 4px;
}

.course-details {
  font-size: 14px;
  color: #6b7280;
}

.remove-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.remove-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Result area */

.result-display {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px;
  border-radius: 20px;
  color: #ffffff;
  margin-bottom: 32px;
}

.gpa-value {
  font-size: 72px;
  font-weight: 900;
  margin-bottom: 8px;
  text-align: center;
}

.gpa-label {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
}

.stat-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 32px;
  font-weight: 900;
}

/* Ads */

.adsense-container {
  background: linear-gradient(135deg, #f3f4ff 0%, #e9e4f0 100%);
  border-radius: 16px;
  padding: 20px;
  margin: 24px 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #a78bfa;
}

.adsense-placeholder {
  text-align: center;
  color: #4c1d95;
  font-size: 14px;
}

.adsense-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.adsense-title {
  font-weight: 600;
  margin-bottom: 8px;
}

/* Info / tables */

.info-box {
  background: linear-gradient(135deg, #f3f4ff 0%, #e9e4f0 100%);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #764ba2;
  margin-top: 24px;
}

.info-title {
  font-weight: 700;
  color: #4c1d95;
  margin-bottom: 8px;
  font-size: 16px;
}

.info-text {
  color: #5b21b6;
  font-size: 14px;
  line-height: 1.6;
}

.grade-scale-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.grade-scale-table th,
.grade-scale-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.grade-scale-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  font-weight: 700;
}

.grade-scale-table tr:hover {
  background: #f3f4ff;
}

/* Download buttons */

.download-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.download-btn {
  flex: 1 1 160px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Blog */

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

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

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

.blog-content h3 {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
  margin-top: 32px;
  margin-bottom: 16px;
}

.blog-content p {
  color: #4a5568;
  font-size: 17px;
  margin-bottom: 18px;
  line-height: 1.9;
}

.blog-content a {
  color: #4c1d95;
  text-decoration: underline;
}

.blog-content a:hover {
  color: #667eea;
}

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

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

.highlight-box {
  background: linear-gradient(135deg, #f3f4ff 0%, #e9e4f0 100%);
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid #764ba2;
  margin: 24px 0;
}

.example-box {
  background: #f3f4ff;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #667eea;
  margin: 24px 0;
}

/* FAQ */

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

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

.faq-inner h3 {
  font-size: 30px;
  margin-bottom: 20px;
  color: #1a202c;
}

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

.faq-item h4 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #111827;
}

.faq-item p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
}

/* Footer */

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

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

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

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

.footer-column ul li a {
  color: #cbd5e0;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-column ul li a:hover {
  color: #667eea;
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 30px;
  text-align: center;
  color: #a0aec0;
}

/* 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;
  }
}
