/* ================= HEADER & FOOTER ================= */

/* RESET (safe) */
.header, .footer {
  width: 100%;
}

/* HEADER */
.header {
  background: linear-gradient(90deg, #111827, #ff5555);
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.container {
  width: 90%;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ff7777, #ffcccc, #ff5555);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

/* FOOTER */
.footer {
  background: linear-gradient(90deg, #111827, #ff5555);
  color: #eee;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  margin-top: 40px;
}

/* MOBILE */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    text-align: center;
  }

  .nav ul {
    flex-direction: column;
  }
}
:root {
  --primary: #1a73e8;
  --bg-light: #f8f9fa;
  --text-dark: #202124;
  --text-muted: #5f6368;
  --border: #e0e0e0;
}

* {
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--bg-light);
  color: var(--text-dark);
}

.app-container {
  max-width: 1200px;
  margin: auto;
  padding: 24px;
}

.app-header {
  text-align: center;
  margin-bottom: 28px;
}

.app-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.calculator-card {
  flex: 3;
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

/* Top section */
.calculator-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.input-area .field {
  margin-bottom: 16px;
}

.field label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.field input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.primary-btn {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

/* Chart */
.chart-area {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Results */
.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 26px;
}

.result-box {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 16px;
}

.result-box span {
  font-size: 14px;
  color: var(--text-muted);
}

.result-box strong {
  display: block;
  font-size: 20px;
  margin-top: 6px;
}

.highlight {
  background: #e8f0fe;
}

/* Ad */
.native-ad {
  flex: 1;
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.05);
  position: sticky;
  top: 24px;
}

.ad-placeholder {
  height: 250px;
  background: #f1f3f4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 900px) {
  .app-layout {
    flex-direction: column;
  }

  .calculator-top {
    grid-template-columns: 1fr;
  }

  .results {
    grid-template-columns: 1fr;
  }

  .native-ad {
    position: relative;
  }
}
/* ================= ENHANCEMENTS (ADDED) ================= */

/* LOGO HOVER GLOW */
.logo:hover {
  text-shadow: 0 0 10px #ff6666, 0 0 20px #ff8888;
}

/* NAV LINK UNDERLINE ANIMATION */
.nav a {
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #ff9999;
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* ABOUT SECTION ENHANCED */
.about {
  background: linear-gradient(135deg, #fff5f5, #ffeaea);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about.visible {
  opacity: 1;
  transform: translateY(0);
}

.about h2 {
  color: #ff5555;
}

/* SCROLL TO TOP BUTTON ENHANCED */
#scrollTopBtn {
  background-color: #ff5555;
  width: 45px;
  height: 45px;
  bottom: 30px;
  right: 30px;
  z-index: 999;
}
/* ARTICLE SECTION */
.article {
  background: #fff;
  padding: 3rem 1rem;
  margin-top: 40px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.05);
}

.article h2 {
  color: #ff5555;
  text-align: center;
  margin-bottom: 1.5rem;
}

.article .toc {
  background: #f9f9f9;
  border-left: 4px solid #ff5555;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.article .toc h3 {
  margin-top: 0;
}

.article .toc ul {
  list-style: none;
  padding-left: 0;
}

.article .toc ul li {
  margin: 0.5rem 0;
}

.article .toc a {
  text-decoration: none;
  color: #1a73e8;
}

.article .toc a:hover {
  text-decoration: underline;
}

.article article p,
.article article ul,
.article article ol {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.article article h3 {
  margin-top: 2rem;
  color: #ff4444;
}
