* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Times New Roman", serif;
    color: #222;
    line-height: 1.6;
    background-image: url("https://images.unsplash.com/photo-1522205408450-add114ad53fe?auto=format&fit=crop&w=1600&q=80"); /* Magazine-style background */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

/* === BACKGROUND OVERLAY FOR READABILITY === */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(245, 245, 240, 0.92);
    z-index: -1;
}

/* === HEADER === */
header {
    background-color: rgba(255, 255, 255, 0.9);
    color: #111;
    text-align: center;
    padding: 25px 0;
    border-bottom: 4px double #000;
    text-transform: uppercase;
    font-family: "Georgia", serif;
    letter-spacing: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* === NAVIGATION === */
nav {
    background-color: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid #444;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-family: "Georgia", serif;
    padding: 12px 18px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav ul li a:hover {
    background-color: #ddd;
    color: #000;
    transition: 0.3s;
}

/* === CONTAINER === */
.container {
    display: flex;
    margin: 20px;
}

/* === SIDEBAR === */
aside {
    width: 25%;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    font-family: "Georgia", serif;
}

aside h2 {
    font-size: 20px;
    text-transform: uppercase;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

aside button {
    display: block;
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 0;
    font-family: "Georgia", serif;
    text-transform: uppercase;
    cursor: pointer;
}

aside button:hover {
    background-color: #444;
}

/* === MAIN CONTENT === */
main {
    width: 75%;
    margin-left: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    font-family: "Times New Roman", serif;
}

main h1, main h2 {
    font-family: "Georgia", serif;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.activities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.activities button {
    flex: 1 1 30%;
    padding: 10px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 0;
    font-family: "Georgia", serif;
    text-transform: uppercase;
    cursor: pointer;
}

.activities button:hover {
    background-color: #444;
}

/* === FOOTER === */
footer {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: 15px;
    border-top: 4px double #444;
    font-family: "Georgia", serif;
    text-transform: uppercase;
}

.dark-mode {
  background-color: #111 !important;
  color: #fff !important;
}

.dark-mode header,
.dark-mode main,
.dark-mode aside {
  background-color: #222 !important;
  color: #eee !important;
}

.dark-mode nav {
  background-color: #333 !important;
}

.dark-mode footer {
  background-color: #000 !important;
}


:root {
  --border-radius: 8px;
  --accent-color: #000;
  --input-bg: #f8f9fa;
}

.grade-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end; /* Aligns items to the bottom of the input area */
  gap: 20px;
  padding: 24px;
  border: 1px solid #eee;
  border-radius: var(--border-radius);
  font-family: 'Inter', sans-serif;
  max-width: 900px;
}

/* Groups label and input together */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1; /* Allows inputs to grow/shrink equally */
  min-width: 150px;
}

label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 0.05em;
}

input[type="number"] {
  padding: 12px;
  background: var(--input-bg);
  border: 1px solid #eee;
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: all 0.2s;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-color);
  background: #fff;
}

.grade-buttons {
  display: flex;
  gap: 10px;
}

button {
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: none;
  background: var(--accent-color);
  color: #fff;
}

#resetGradeBtn {
  background: #eee;
  color: #555;
}

/* Result box aligns to the right or bottom depending on width */
.grade-output {
  padding: 10px 20px;
  border-left: 3px solid var(--accent-color);
  background: #fdfdfd;
  min-width: 120px;
}

.grade-output p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}