/* ========== GLOBAL STYLES ========== */
html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #fff;
  color: #000;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* ========== CONTAINER ========== */
.home-container {
  width: 100%;
  max-width: 1000px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: flex-start;
  position: relative;
}

/* ========== HEADER ========== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0 15px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 25px;
}

header h1 {
  font-weight: 700;
  font-size: 1.6rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========== BUTTONS ========== */
button {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background-color: #000;
  color: #fff;
  padding: 10px 18px;
}

.btn-primary:hover {
  background-color: #333;
}

.btn-outline {
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
  padding: 10px 18px;
}

.btn-outline:hover {
  background-color: #000;
  color: #fff;
}

.btn-secondary {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
  padding: 10px 18px;
}
.btn-secondary:hover {
  background-color: #e0e0e0;
}

.btn-danger {
  background-color: #d9534f;
  color: #fff;
  padding: 10px 18px;
}
.btn-danger:hover {
  background-color: #c9302c;
}


/* ========== MAIN CONTENT ========== */
main {
  flex: 1;
}

main h2 {
  font-weight: 700;
  font-size: 1.4rem;
  margin-top: 0;
}

hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 10px 0 20px;
}

/* ========== SUBJECT SECTIONS ========== */
.subjects {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.subject-year h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}


/* ========== SUBJECT CARDS ========== */
.subject-card {
  border: 1px solid #ddd; 
  border-radius: 14px;
  padding: 25px 30px;
  margin-top: 20px;
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.subject-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.subject-card h4 {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 8px 0;
}

.subject-card small {
  color: #555;
  display: block;
  margin-bottom: 10px;
}

.subject-card button {
  margin-top: 12px;
  background-color: #000;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.subject-card button:hover {
  background-color: #333;
}

.subject-card button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

.subject-year {
  margin-bottom: 30px;
}

.subject-semester {
  margin-left: 25px;
  margin-top: 15px;
}

.subject-semester h3 {
  color: #444;
  margin-bottom: 5px;
}

.year-divider {
  height: 2px;
  background-color: #ccc;
  margin: 5px 0 10px 0;
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  font-size: 0.85rem;
  color: #555;
  padding: 15px 0;
  border-top: 1px solid #ddd;
  /* FIX: Removed redundant margin-top for consistency */
}

/* ===== Performance Section ===== */
.performance-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.performance-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.big-emoji {
  font-size: 4rem;
}

.performance-info h3 {
  margin: 0;
  font-size: 1.6rem;
}

.performance-info p {
  margin-top: 6px;
  font-size: 0.95rem;
  color: #555;
}

.performance-right {
  position: relative;
  width: 200px;
  height: 200px;
}

.chart-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  font-size: 1.5rem;
  color: #2c3e50;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
  .home-container {
    padding: 0 15px;
  }

  header {
    flex-direction: column;
    gap: 10px;
  }

  header h1 {
    font-size: 1.4rem;
  }
  
  /* FIX: Added responsive rules for performance section */
  .performance-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  
  .performance-left {
    flex-direction: column;
    gap: 10px;
  }
  
  .big-emoji {
    font-size: 3rem; /* Smaller emoji for mobile */
  }
  
  .performance-info h3 {
    font-size: 1.3rem; /* Smaller header for mobile */
  }
  
  .subject-semester {
    margin-left: 0; /* Remove indent on mobile */
  }

  .subject-card {
    padding: 20px;
  }

  .subject-card button {
    width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}