/* --- Global Reset --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- Body --- */
body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f8f9fb;
  color: #222;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s ease;
}

/* --- Header --- */
header {
  text-align: center;
  background: linear-gradient(to right, #2a9d8f, #5dc88d);
  color: white;
  padding: 30px 15px;
  border-bottom: 4px solid #ccc;
}

header h1 {
  font-size: 2rem;
  letter-spacing: 2px;
}

header p {
  margin-top: 5px;
  font-size: 1rem;
  opacity: 0.9;
}

/* --- Navigation --- */
nav {
  background-color: #fff;
  border-bottom: 2px solid #ddd;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

#navList {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 50px;
  padding: 15px 0;
}

#navList a {
  text-decoration: none;
  color: #2a9d8f;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

#navList a:hover {
  text-decoration: underline;
  color: #1b7a6d;
}

/* --- Layout --- */
#layout {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 40px;
  padding: 40px 20px;
  flex: 1;
}

/* --- Sidebar --- */
#sidebar {
  flex: 0 0 280px;
  background: linear-gradient(to bottom, #2a9d8f, #5dc88d);
  color: white;
  padding: 25px 15px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

#sidebar h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 8px;
  width: 100%;
}

#sidebar img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  margin-bottom: 15px;
}

/* --- Sidebar Activities (Dynamic Buttons) --- */
.sidebar-activities {
  width: 100%;
}

.sidebar-activities h3 {
  font-size: 1.1rem;
  margin: 15px 0 10px 0;
  color: #ffeb3b;
  text-align: center;
}

.sidebar-activities button {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-align: left;
  padding: 10px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-activities button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(5px);
}

hr {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.3);
  margin: 20px 0;
}

/* --- Main Content --- */
#main {
  flex: 1;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#main h2 {
  color: #2a9d8f;
  border-left: 5px solid #2a9d8f;
  padding-left: 10px;
  margin-bottom: 15px;
}

/* --- Interactive Elements & Playground --- */
.playground {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.widget {
  flex: 1 1 300px;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
}

input[type="text"], input[type="number"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button#submitItemBtn, button#calculateBtn {
  background-color: #2a9d8f;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

.widget{
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.scene-img{
  width: 300px;
  border-radius: 8px;
}

#miniCalc{
  width: 250px;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

#calcOutput{
  margin-top: 10px;
  border: 1px solid #aaa;
  min-height: 40px;
  padding: 8px;
}
/* --- Footer --- */
footer {
  text-align: center;
  padding: 20px;
  border-top: 2px solid #ccc;
  background-color: #fff;
  color: #2a9d8f;
  font-weight: 600;
  margin-top: auto;
}

/* --- Dark Mode --- */
.dark-mode {
  background-color: #111 !important;
  color: #f4f4f4 !important;
}

.dark-mode #main {
  background-color: #222;
  border-color: #444;
  color: #e5e5e5;
}

.dark-mode .widget {
  background-color: #333;
  border-color: #555;
}

.grade-container{
  max-width:1300px;
  background:#f4f4f4;
  padding:20px;
  border-radius:10px;
  box-shadow:0 0 10px rgba(0,0,0,0.1);
}

.grade-container input{
  width:100%;
  padding:10px;
  margin:8px 0;
  border:1px solid #ccc;
  border-radius:5px;
}

.grade-buttons{
  margin-top:10px;
}

.grade-buttons button{
  padding:10px 15px;
  margin-right:5px;
  border:none;
  border-radius:5px;
  background:#2e8b7f;
  color:white;
  cursor:pointer;
}

.grade-buttons button:hover{
  background:#246e63;
}

.grade-output{
  margin-top:15px;
  padding:10px;
  border:1px solid #ccc;
  min-height:50px;
}