* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    color: #5a4a3f;
    line-height: 1.7;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-color: rgba(245, 235, 220, 0.95);
    z-index: -1;
}

header {
    background-color: rgba(250, 240, 225, 0.95);
    font-family: "Playfair Display", serif;
    font-weight: 600;
    font-size: 28px;
    color: #4b3f35;
    text-align: center;
    padding: 0 0;
    letter-spacing: 2px;
    border-bottom: 3px solid #d8c3a5;
}

nav {
    background-color: #e6d5c3;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li a {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    color: #4b3f35;
    text-decoration: none;
    padding: 14px 22px;
    display: block;
    transition: 0.3s ease;
}

nav ul li a:hover {
    background-color: #f5e6d3;
    border-radius: 25px;
}

.container {
    display: flex;
    gap: 25px;
    margin: 30px;
}

.js-section {
    text-align: center;
}
.activities-section {
    text-align: center;
}

aside {
    width: 25%;
    background-color: #faf1e6;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(150, 130, 100, 0.1);

    max-height: 100%;
    overflow-y: auto;
}

aside h2 {
    font-family: "Playfair Display", serif;
    margin-bottom: 15px;
}

main {
    width: 75%;
    background-color: #fff8ee;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(150, 130, 100, 0.1);
}

main h1, main h2 {
    font-family: "Playfair Display", serif;
    margin-bottom: 15px;
}

.activities {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* 👈 centers horizontally */
    gap: 12px;
}

button {
    width: 160px; /* fixed width for perfect alignment */
    padding: 15px 20px;
    background: linear-gradient(145deg, #d8c3a5, #c2a97e);
    border: none;
    border-radius: 30px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 3px 3px 8px rgba(150, 130, 100, 0.2);
    text-align: center;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 6px 6px 15px rgba(150, 130, 100, 0.25);
    background: linear-gradient(145deg, #c2a97e, #b89b6d);
}

footer {
    background-color: #e6d5c3;
    text-align: center;
    padding: 20px;
    font-family: "Playfair Display", serif;
    letter-spacing: 1px;
}

.dark-mode {
  background-color: #3a2f27 !important;
  color: #f5e6d3 !important;
}

.dark-mode header,
.dark-mode footer,
.dark-mode main,
.dark-mode aside {
  background-color: #1f1a17 !important;
  color: #f5e6d3 !important;
}

.dark-mode nav {
  background-color: #5a4a3f !important;
}

.dark-mode button {
  background: linear-gradient(145deg, #7a6755, #5f4f42);
}


/* 🎓 Section Container */
.grade-section {
  max-width: 640px;
  margin: 50px auto;
  padding: 28px 30px;
  background: #e8dfd4;
  border-radius: 14px;
  box-shadow: 
    0 8px 20px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.4);
  text-align: center;
}

/* 🏷️ Title */
.grade-section h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #4e4035;
  margin-bottom: 22px;
}

/* 📐 Form Layout (FIXED ALIGNMENT) */
.grade-row {
  display: grid;
  grid-template-columns: 150px 1fr; /* label | input */
  align-items: center;
  gap: 12px 15px;
  margin-bottom: 18px;
}

/* Labels */
.grade-row label {
  font-size: 14px;
  color: #5c4d42;
  font-weight: 500;
  text-align: left;
}

/* Inputs */
.grade-row input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #b8a999;
  background: #f7f4ef;
  font-size: 14px;
  transition: all 0.25s ease;
}

/* Input Focus Effect */
.grade-row input:focus {
  outline: none;
  border-color: #c9ad86;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(201, 173, 134, 0.25);
}

/* 🔘 Buttons */
.grade-buttons {
  margin-top: 15px;
}

.grade-buttons button {
  padding: 9px 20px;
  margin: 6px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(135deg, #c9ad86, #b89a70);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Hover */
.grade-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* Click */
.grade-buttons button:active {
  transform: scale(0.97);
}

/* 📊 Results */
#finalGrade {
  margin-top: 18px;
  font-size: 17px;
  font-weight: 600;
  color: #3f332a;
}

#gradeEquivalent {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 500;
  color: #5a4a3f;
}

/* ⚠️ Error */
.error {
  color: #d9534f !important;
  font-weight: 600;
}