@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-body: #f3f4f6;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-light: #e5e7eb;
  
  /* Left Accents for different tools */
  --accent-primary: #3b82f6; /* Blue for general */
  --accent-lgs: #f97316; /* Orange */
  --accent-kpss: #14b8a6; /* Teal */
  --accent-dgs: #8b5cf6; /* Violet */
  --accent-not: #ec4899; /* Pink */
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  --radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 15px;
}

.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }

/* HEADER & TITLES */
header {
  margin-bottom: 40px;
}
h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
}
h2 {
  font-size: 1.5rem;
  font-weight: 600;
}
.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* NAVBAR BREADCRUMB */
.nav-back {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}
.nav-back:hover {
  color: var(--accent-primary);
}

/* CARDS AESTHETIC - Clean UI & Left Accent */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.calc-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  border-left: 6px solid var(--accent-primary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.calc-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.calc-card--lgs { border-left-color: var(--accent-lgs); }
.calc-card--kpss { border-left-color: var(--accent-kpss); }
.calc-card--dgs { border-left-color: var(--accent-dgs); }
.calc-card--not { border-left-color: var(--accent-not); }

.calc-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.calc-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* FORM STYLES */
.form-panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
  border-left: 6px solid var(--accent-primary);
  margin-bottom: 30px;
}
.form-panel.lgs-theme { border-left-color: var(--accent-lgs); }
.form-panel.kpss-theme { border-left-color: var(--accent-kpss); }
.form-panel.dgs-theme { border-left-color: var(--accent-dgs); }
.form-panel.not-theme { border-left-color: var(--accent-not); }

.input-groups-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: #f9fafb;
}

.input-row input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lgs-theme .input-row input:focus { border-color: var(--accent-lgs); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1); }
.kpss-theme .input-row input:focus { border-color: var(--accent-kpss); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1); }
.dgs-theme .input-row input:focus { border-color: var(--accent-dgs); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); }

.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  color: #ffffff;
  background-color: var(--accent-primary);
  margin-top: 20px;
}

.btn:hover { background-color: #2563eb; }
.btn.btn-lgs { background-color: var(--accent-lgs); }
.btn.btn-lgs:hover { background-color: #ea580c; }
.btn.btn-kpss { background-color: var(--accent-kpss); }
.btn.btn-kpss:hover { background-color: #0d9488; }
.btn.btn-dgs { background-color: var(--accent-dgs); }
.btn.btn-dgs:hover { background-color: #7c3aed; }
.btn.btn-not { background-color: var(--accent-not); }
.btn.btn-not:hover { background-color: #db2777; }

/* DYNAMIC TABLE / ROW STYLES FOR GPA */
.dynamic-rows {
  margin-bottom: 20px;
}
.dynamic-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
  padding: 15px;
  background: #f9fafb;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
.dynamic-row input, .dynamic-row select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 1rem;
}
.dynamic-row button.remove-btn {
  background: #ef4444;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}
.add-row-btn {
  background: none;
  border: 2px dashed var(--border-light);
  color: var(--text-muted);
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.add-row-btn:hover {
  border-color: var(--accent-not);
  color: var(--accent-not);
}


/* RESULT AREA */
.result-panel {
  display: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-light);
  animation: fadeIn 0.5s ease;
  margin-bottom: 40px;
}

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

.score-display {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin: 15px 0;
}

.score-details {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.detail-badge {
  background: #f3f4f6;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* CONTENT / SEO AREA */
.seo-content {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.seo-content h2 { margin-bottom: 15px; font-size: 1.4rem; border-bottom: 1px solid var(--border-light); padding-bottom: 10px;}
.seo-content h3 { margin: 20px 0 10px; font-size: 1.2rem; }
.seo-content p { margin-bottom: 15px; color: #4b5563; }
.seo-content ul { padding-left: 20px; margin-bottom: 15px; color: #4b5563;}
.seo-content li { margin-bottom: 8px; }

/* RESPONSIVE */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }
  .container {
    margin: 20px auto;
  }
  .form-panel, .result-panel {
    padding: 20px 15px;
  }
  h1 {
    font-size: 1.5rem;
  }
  .score-display {
    font-size: 2.5rem;
  }
  .input-groups-wrapper {
    grid-template-columns: 1fr;
  }
  .dynamic-row {
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    padding: 15px 10px;
  }
  .dynamic-row > input[type="text"] {
    grid-column: 1 / -1;
  }
  .footer-links {
    flex-direction: column;
    padding: 0 20px;
  }
}

/* FOOTER LINKS */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: var(--bg-card);
  color: var(--text-main);
  text-decoration: none;
  border-radius: 30px;
  border: 1px solid var(--border-light);
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}
.footer-link:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
