* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

p {
  text-align: justify;
}

h1 a {
  text-decoration: none;
  color: inherit;
}

body {
  font-family: "Segoe UI", sans-serif;
  color: #f5f5f5;
  background: #000000;
  line-height: 1.6;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: #121212;
  border-bottom: 1px solid #333;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  height: 50px;
  margin-right: 15px;
}

.logo-container h1 {
  font-size: 1.8rem;
  color: #f5f5f5;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: #f5f5f5;
  font-weight: 500;
}

.hero {
  padding: 60px 40px;
  text-align: center;
  background: linear-gradient(to right, #3f51b5, #9c27b0);
  color: #ffffff;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px auto;
  text-align: center;
}

.cta-button {
  padding: 12px 24px;
  background-color: #f5f5f5;
  color: #3f51b5;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}

.cta-button:hover {
  background-color: #cfcfcf;
}

.about {
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.about h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #ffffff;
}



footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 20px;
  background-color: #121212;
  font-size: 0.9rem;
  color: #aaa;
}

/* =================================== */
/*        Authentication Forms         */
/* =================================== */

.auth-form-container {
  max-width: 500px;
  margin: 60px auto;
  padding: 40px;
  background-color: #1e1e1e;
  border-radius: 8px;
  text-align: center;
}

.auth-form-container h2 {
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #555;
  background-color: #333;
  color: #f5f5f5;
  font-size: 1rem;
}

.auth-form-container button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(to right, #3f51b5, #9c27b0);
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s;
}

.auth-form-container button:hover {
  opacity: 0.9;
}

.form-footer-links {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-size: 0.9rem;
}

.form-footer-links .auth-switch {
  margin-top: 0;
}

/* This rule now targets links inside EITHER class */
.form-footer-links a,
.auth-switch a {
  color: #f28fe7; 
  text-decoration: none;
}
.form-footer-links a:hover,
.auth-switch a:hover {
}

.link-primary {
  color: #f28fe7;
  text-decoration: none;
}

.link-primary:hover {
  text-decoration: underline;
}


.error-message {
  color: #ff8a80;
  margin-bottom: 15px;
  min-height: 1.2em;
}

.cta-button-nav {
  padding: 8px 18px;
  background-color: #3f51b5;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}

.cta-button-nav:hover {
  background-color: #5c6bc0;
}

/* =================================== */
/*         Explore Page Styles         */
/* =================================== */

.explore-section {
  text-align: center;
  padding: 60px 20px;
}

.explore-section h2 {
    font-size: 2.5rem;
}

.spectrum-bar {
  width: 90%;
  max-width: 700px;
  height: 60px;
  margin: 40px auto;
  background: linear-gradient(to right, #3f51b5, #673ab7, #f28fe7);
  border-radius: 30px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.spectrum-bar span {
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
  flex: 1; 
  text-align: center;
}

.descriptions {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: left;
}

.descriptions h3 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 10px;
}

.research-heading { color: #7986cb; }
.data-heading { color: #9575cd; }
.education-heading { color: #f28fe7; }

.descriptions p {
  text-align: justify;
  font-size: 1rem;
  margin-bottom: 20px;
  color: #ddd;
}

/* ======================================================== */
/*           MOVED CONTACT PAGE STYLES OUT OF THE           */
/*                  RESPONSIVE BLOCK BELOW                  */
/* ======================================================== */

/* =================================== */
/*          Contact Page Styles        */
/* =================================== */

.contact-section {
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-section p {
  margin-bottom: 2em;
  text-align: left;
}

.info-link {
  color: #7986cb;
  text-decoration: none;
  font-weight: bold;
}
.info-link:hover {
  text-decoration: underline;
}

.support-link {
  color: #f28fe7;
  text-decoration: none;
  font-weight: bold;
}
.support-link:hover {
  text-decoration: underline;
}

/* =================================== */
/*         Dashboard Styles            */
/* =================================== */

.dashboard-container {
  display: flex;
  min-height: 80vh; /* Make it take up most of the screen height */
}

/* === Sidebar Styling === */
.dashboard-sidebar {
  flex: 0 0 260px; /* Don't grow, don't shrink, base width of 260px */
  background-color: #121212;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  color: #ccc;
}

/* Add this rule to your style.css in the sidebar section */

.profile-section p {
  text-align: center; /* This will center the email and nickname paragraphs */
}

.profile-section {
  text-align: center;
  margin-bottom: 40px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%; /* Makes the image a circle */
  object-fit: cover; /* Prevents image stretching */
  border: 3px solid #3f51b5;
  margin-bottom: 15px;
}

.profile-section h3 {
  font-size: 1.1rem;
  color: #fff;
  word-wrap: break-word; /* Prevents long emails from overflowing */
}

.dashboard-nav ul {
  list-style: none;
}

.dashboard-nav a {
  display: block;
  padding: 12px 15px;
  color: #ccc;
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: background-color 0.2s, color 0.2s;
}

.dashboard-nav a:hover {
  background-color: #2a2a2a;
  color: #fff;
}

.dashboard-nav a.active {
  background-color: #3f51b5;
  color: #fff;
  font-weight: bold;
}

.sidebar-logout {
  margin-top: auto; /* Pushes the button to the bottom */
  padding: 12px;
  border: none;
  border-radius: 8px;
  background-color: #5c6bc0;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar-logout:hover {
  background-color: #c62828; /* A red color for logout */
}

/* === Main Content Styling === */
/* === Main Content Styling (CORRECTED AND FINAL) === */
.dashboard-main-content {
  flex: 1; /* Take up the rest of the available space */
  padding: 40px;
  background-color: #1e1e1e;
}

.dashboard-main-content h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.dashboard-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr; /* One column by default, maintains your original layout */
  gap: 30px;
}

/* Card styling for content blocks */
.card {
  background-color: #121212;
  padding: 30px;
  border-radius: 8px;
  overflow: visible;
}

.card h3 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  border-bottom: 2px solid #3f51b5;
  padding-bottom: 10px;
}

/* Keep the simple styling for the canvas */
.card canvas {
  max-width: 100%; 
  height: auto;
} 

.card {
  margin-top: -20px; /* Pulls the card boundary downward */
  overflow: visible !important;
}

#quiz-score-chart {
  display: block;
  margin: 0 auto;
  max-width: 100%; 
  height: auto;
}

/* =================================== */
/*      Account Settings Styles        */
/* =================================== */
.account-settings-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  background-color: #1e1e1e;
  border-radius: 8px;
}
.account-settings-container h2 {
  text-align: center;
  margin-bottom: 10px;
}
.account-settings-container p {
  text-align: center;
  color: #aaa;
  margin-bottom: 40px;
}

#profile-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-pic-section {
  position: relative;
  margin-bottom: 30px;
  width: 150px;
  height: 150px;
}

#profile-pic-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover; /* This is the magic property */
  border: 4px solid #333;
}

.profile-email-display-large {
  font-size: 1.1rem;
  color: #ccc;
  text-align: center;
  margin-bottom: 30px;
  word-wrap: break-word;
}

.upload-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background-color: #3f51b5;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}
.upload-btn:hover {
  background-color: #5c6bc0;
}
#photo-upload {
  display: none; /* Hide the ugly default file input */
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two columns */
  gap: 20px 30px;
  width: 100%;
  margin-bottom: 30px;
}

#save-profile-btn {
  width: 50%;
  padding: 12px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(to right, #3f51b5, #9c27b0);
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s;
}
#save-profile-btn:hover {
  opacity: 0.9;
}

.status-message {
  margin-top: 20px;
  color: #4caf50; /* Green for success */
  font-weight: bold;
}

/* =================================== */
/*      Multi-Step Form Styles         */
/* =================================== */
.form-step {
  display: none; /* Hide all steps by default */
}
.form-step.active {
  display: block; /* Show only the active step */
}

.button-group {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.button-group .next-btn,
.button-group .prev-btn,
.button-group #final-submit-btn {
  width: 48%;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}
.form-group-checkbox input {
    width: auto;
    margin-right: 10px;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}
.progress-bar-step {
    text-align: center;
    width: 33.33%;
    color: #555;
    font-weight: bold;
}
.progress-bar-step.active {
    color: #f5f5f5;
}

/* Add this to the end of your style.css */
.form-group-display-only {
  width: 100%;
  text-align: center;
  margin-bottom: 30px;
}
.form-group-display-only label {
  font-weight: bold;
  color: #ccc;
  display: block;
  margin-bottom: 5px;
}
.form-group-display-only p {
  font-size: 1.1rem;
  color: #fff;
  background-color: #333;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
}
.section-divider {
  width: 100%;
  text-align: center;
  border-bottom: 1px solid #444;
  line-height: 0.1em;
  margin: 40px 0;
}
.section-divider h3 {
  background: #1e1e1e;
  padding: 0 20px;
  color: #f5f5f5;
}

/* =================================== */
/*        Admin Dashboard Styles       */
/* =================================== */

.admin-container {
  padding: 40px;
  max-width: 1200px;
  margin: 40px auto;
}
.admin-container h2 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 10px;
}
.admin-container p {
  text-align: center;
  color: #aaa;
  margin-bottom: 30px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.9rem;
}

.user-table th, .user-table td {
  padding: 12px 15px;
  border: 1px solid #333;
  text-align: left;
  white-space: nowrap; /* Prevents text from wrapping */
}

.user-table thead th {
  background-color: #1e1e1e;
  font-weight: bold;
  cursor: pointer;
  position: relative;
}
.user-table thead th:hover {
    background-color: #2a2a2a;
}

/* =================================== */
/*          Modal Styles               */
/* =================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: #1e1e1e;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

#modal-body {
  margin-top: 20px;
  line-height: 1.8;
}

#modal-body p {
  text-align: left;
}

#modal-body strong {
  color: #8ab4f8;
}

/* =================================== */
/*        Mobile-First Layout          */
/* =================================== */

.dashboard-container {
  display: flex;
  flex-direction: column; /* Sidebar above content */
  min-height: 100vh;
}

/* === Sidebar as top header === */
.dashboard-sidebar {
  width: 100%;
  padding: 20px;
  background-color: #121212;
  border-bottom: 1px solid #333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-section {
  text-align: center;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #3f51b5;
  margin-bottom: 10px;
}

.dashboard-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.dashboard-nav a {
  text-decoration: none;
  color: #ccc;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 5px;
  transition: background-color 0.2s;
}

.dashboard-nav a.active,
.dashboard-nav a:hover {
  background-color: #3f51b5;
  color: white;
}

.sidebar-logout {
  margin-top: 20px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background-color: #5c6bc0;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}

/* === Main Dashboard Content === */
.dashboard-main-content {
  padding: 30px 20px;
  background-color: #1e1e1e;
  flex: 1;
  max-width: 1000px;
  margin: 0 auto; /* Center the content on larger screens */
}

.dashboard-main-content h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.dashboard-main-content p {
  color: #aaa;
}

/* === Card Grid === */
.dashboard-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr; /* One column on mobile */
  gap: 30px;
}

/* === Card Styling === */
.card {
  background-color: #121212;
  padding: 24px;
  border-radius: 10px;
}

.card h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
  border-bottom: 2px solid #3f51b5;
  padding-bottom: 8px;
}

/* === Tablet/Desktop 2-column grid === */
@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-main-content {
    padding: 40px;
  }
}

/* === Tablet/phone button fix === */
@media (max-width: 480px) {
  .cta-button-nav {
    padding: 10px 16px;
    font-size: 0.9rem;
    display: inline-block;
    max-width: 100%;
    text-align: center;
    white-space: nowrap;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
}
