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

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

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

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

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.site-name {
  text-decoration: none;
}

/* Desktop nav */
.nav-links-desktop {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

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

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

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s ease;
}

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

.dropdown-content {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  animation: fadeInDown 0.25s ease;
  z-index: 1100;
}

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

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

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

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

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  background: #059669;
  padding: 10px 0 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
  z-index: 1200;
}

.mobile-menu a {
  display: block;
  padding: 10px 18px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 15px;
}

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

.mobile-menu a:hover {
  background: rgba(0, 0, 0, 0.08);
}

.mobile-menu.open {
  display: flex;
  animation: slideDown 0.25s ease-out;
}

/* Hero / header section */
.page-header {
  position: relative;
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
  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;
}

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

.page-header p {
  position: relative;
  z-index: 1;
  font-size: 22px;
  max-width: 750px;
  margin: 0 auto;
  animation: slideInUp 0.6s ease;
}

.emoji-hero {
  font-size: 64px;
  margin-bottom: 16px;
}

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

/* Cards */
.calculator-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
  animation: slideUp 0.5s ease;
  margin-bottom: 24px;
}

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

.card-soft {
  background: linear-gradient(135deg, #f3f4ff 0%, #e9e4f0 100%);
  border: 2px solid #667eea;
}

.card-soft-title {
  font-size: 24px;
  font-weight: 800;
  color: #4c1d95;
  margin-bottom: 20px;
  text-align: center;
}

.card-soft-subtitle {
  font-size: 20px;
  font-weight: 800;
  color: #4c1d95;
  margin-bottom: 16px;
}

/* Inputs */
.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

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

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

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

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

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

.input-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #4c1d95;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Meal cards */
.meal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.meal-card {
  padding: 20px;
  border-radius: 12px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  text-align: center;
  transition: all 0.2s ease;
}

.meal-card:hover {
  transform: translateY(-2px);
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.meal-icon {
  margin-bottom: 8px;
  font-size: 32px;
}

.meal-name {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #4c1d95;
}

.meal-protein {
  font-size: 24px;
  font-weight: 900;
  color: #667eea;
}

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

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

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

/* Food examples */
.food-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.food-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: #ffffff;
}

.food-name {
  font-size: 14px;
  font-weight: 600;
  color: #4c1d95;
}

.food-protein {
  font-size: 14px;
  font-weight: 700;
  color: #667eea;
}

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

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

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

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

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

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

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

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

.blog-content p {
  margin-bottom: 20px;
  font-size: 17px;
  color: #4a5568;
}

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

.blog-content ul {
  margin: 0 0 20px 28px;
  color: #4a5568;
}

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

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

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

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

.faq-content h2 {
  margin-bottom: 24px;
}

.faq-item + .faq-item {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.faq-item h3 {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
}

.faq-item p {
  margin: 0;
  font-size: 15px;
  color: #4a5568;
}

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

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

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

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

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

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

.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #a0aec0;
  font-size: 14px;
}

/* 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 slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-18px) rotate(4deg);
  }
}

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

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

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

/* Responsive */
@media (max-width: 1024px) {
  .nav-links-desktop {
    display: none !important; 
  }

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


@media (max-width: 768px) {
  .page-header {
    padding: 60px 16px;
  }

  .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;
  }

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

  .food-examples {
    grid-template-columns: 1fr;
  }

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

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

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

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

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