:root {
  --primary: #6366f1;
  --secondary: #a855f7;
  --glass: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #0f172a; 
  color: var(--text);
  overflow: hidden; /* Keeps the background static */
  height: 100vh;
}

body.dark-mode {
  background-color: #091118; 
  color: #ecf0f1;           
}

/* Background Decoration */
.bg-circles {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
}

.circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.c1 { width: 300px; height: 300px; background: var(--primary); top: 10%; left: 15%; opacity: 0.4; }
.c2 { width: 400px; height: 400px; background: var(--secondary); bottom: 10%; right: 15%; opacity: 0.3; }

/* Navigation */
nav {
  padding: 20px;
  display: flex;
  justify-content: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000; /* Keeps nav above everything */
}

.nav-links {
  background: var(--glass);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 5px;
}

nav button {
  background: transparent;
  border: none;
  color: white;
  padding: 8px 15px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
  border-radius: 20px;
}

nav button:hover { 
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary); 
}

/* Main Glass Cards */
.section {
  display: none;
  height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 20px 20px; /* Top padding to clear the fixed Nav */
}

.section.active { display: flex; animation: fadeIn 0.5s ease; }

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 40px;
  border-radius: 24px;
  text-align: center;
  max-width: 550px;
  width: 100%;
  max-height: 85vh; 
  overflow-y: auto; 
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.glass-card::-webkit-scrollbar {
  width: 6px;
}
.glass-card::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* Buttons */
.main-btn {
  margin-top: 20px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.main-btn:hover { transform: translateY(-3px); }

.activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 25px;
}

.activity-grid button {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  padding: 15px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s;
}

.activity-grid button:hover { 
  background: var(--primary); 
  transform: scale(1.02);
}

.full-width { grid-column: span 2; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.calculator-card .input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #ecf0f1;
}

.input-group input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
    border-radius: 8px;
    color: white;
    outline: none;
}

.result-box {
    margin-top: 20px;
    padding: 15px;
    background: rgba(26, 188, 156, 0.2);
    border-radius: 10px;
    font-weight: bold;
}

#finalGrade, #gradeLetter {
    color: #1abc9c;
    font-size: 1.4rem;
}

.grading-table-container {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.grading-table-container h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #1abc9c;
}

.grading-scale {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.grading-scale th, .grading-scale td {
    padding: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.grading-scale th {
    background: rgba(26, 188, 156, 0.3);
    color: white;
    font-weight: 600;
}

.grading-scale td {
    color: #ecf0f1;
}