/* User info section: giữ các thành phần trên một hàng */
#user-info-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Fixed header for desktop */
@media (min-width: 901px) {
  .fpt-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 8px rgba(60, 80, 180, 0.08);
  }

/* Fixed header and footer for mobile */
@media (max-width: 900px) {
  .fpt-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 8px rgba(60, 80, 180, 0.08);
  }

  .fpt-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(60, 80, 180, 0.08);
  }

  .fpt-main-content {
    padding-top: 70px;
    padding-bottom: 56px;
  }
}

/* Responsive layout for planning-task-fields in planning-task-creator */
.planning-task-fields {
  display: flex;
  gap: 16px;
  width: 100%;
}

.fpt-mobile-banner {
  background: linear-gradient(180deg, #3f51b5 0%, #eaf2ff 100%);
  color: #fff;
  text-align: center;
  padding: 2rem 1rem 1.5rem 1rem;
  border-radius: 0 0 32px 32px;
  position: relative;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .planning-task-fields {
    flex-direction: column;
    gap: 12px;
  }

  .planning-section .dashboard-grid {
    grid-template-columns: auto !important;
  }
}

/* Planning tab grid layout for task creator and full-width task list */
.planning-section .dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
}

.planning-task-creator {
  grid-column: 1;
}

/* Desktop: vẫn dùng grid-column */
.planning-task-list {
  grid-column: 2;
}

/* Mobile: bỏ grid-column, dùng block */
@media (max-width: 900px) {
  .planning-task-list {
    grid-column: auto !important;
    display: block !important;
    width: 100% !important;
  }
}

@media (max-width: 600px) {
  .planning-task-list {
    grid-column: auto !important;
    display: block !important;
    width: 100% !important;
  }
}

@media (max-width: 900px) {

  .tracking-grid .dashboard-card,
  .settings-grid .dashboard-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-shadow: 0 6px 24px rgba(60, 80, 180, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #dbeafe;
    background: transparent;
    padding: 1.2rem 0.7rem;
  }
}

@media (max-width: 600px) {

  .tracking-grid .dashboard-card,
  .settings-grid .dashboard-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-shadow: 0 6px 24px rgba(60, 80, 180, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #dbeafe;
    background: transparent;
    padding: 1rem 0.3rem;
  }
}

/* Settings tab grid layout for balanced feature blocks */
.settings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
}

.settings-profile,
.settings-subjects {
    flex: 1 1 0; /* Cho phép các cột co giãn và có kích thước cơ sở là 0 */
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.settings-pomodoro {
    width: 100%; /* Đảm bảo mục này chiếm toàn bộ chiều rộng hàng dưới */
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Các lớp đã được thêm vào để thay thế các thuộc tính style nội tuyến */
.profile-info-body, .subject-list-body, .pomodoro-presets-body {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-info-body {
    gap: 18px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* CSS cho desktop và các màn hình lớn hơn */
.pomodoro-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.preset-option {
  /* Mỗi tùy chọn chiếm khoảng 1/3 chiều rộng, trừ đi khoảng cách */
  flex: 1 1 calc(33.33% - 10px);
  max-width: calc(33.33% - 10px);
  /* Đảm bảo chiều cao đồng nhất */
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* * Điều chỉnh bố cục cho màn hình mobile (nhỏ hơn 768px).
 * Mỗi tùy chọn sẽ chiếm toàn bộ chiều rộng, hiển thị trên một hàng riêng.
 */
@media (max-width: 768px) {
    .pomodoro-presets {
        /* Chuyển sang bố cục cột duy nhất để các mục xếp chồng lên nhau */
        flex-direction: column;
    }

    .preset-option {
        /* Các tùy chọn sẽ chiếm 100% chiều rộng */
        flex: 1 1 100%;
        max-width: 100%;
        /* Tăng khoảng cách dưới mỗi mục để dễ đọc hơn */
        margin-bottom: 10px;
    }
}
@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0.5rem;
    align-items: stretch;
  }

  .settings-profile,
  .settings-pomodoro,
  .settings-subjects {
    min-height: 220px;
  }
}

.tracking-section,
.dashboard-wrapper,
.tracking-grid {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
}

.tracking-grid .dashboard-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Tracking tab grid layout for balanced, prominent charts */
.tracking-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2rem 1.5rem;
}

.tracking-stat {
  grid-row: 1;
}

.tracking-chart-large {
  grid-row: 2;
  min-width: 0;
}

@media (max-width: 900px) {
  .tracking-grid {
    display: flex;
    flex-direction: column;
    gap: 1.7rem;
    padding: 1.2rem 0.7rem;
  }

  .tracking-grid .dashboard-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-shadow: 0 6px 24px rgba(60, 80, 180, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #dbeafe;
    background: #fff;
    padding: 1.2rem 0.7rem;
  }

  .tracking-stat {
    min-height: 80px;
    margin-bottom: 0;
  }

  .tracking-chart {
    min-height: 200px;
    width: 100%;
    margin-bottom: 0;
  }

  .badge-card {
    width: 100%;
    margin-bottom: 0;
  }

  /* Bố cục chính cho desktop */
  .settings-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-gap: 20px;
  }


  .settings-grid .dashboard-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-shadow: 0 6px 24px rgba(60, 80, 180, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #dbeafe;
    background: #fff;
    padding: 1.2rem 0.7rem;
  }
}

@media (max-width: 600px) {
  .tracking-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 0.7rem 0.3rem;
  }

  .tracking-grid .dashboard-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-shadow: 0 6px 24px rgba(60, 80, 180, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #dbeafe;
    background: #fff;
    padding: 1rem 0.3rem;
  }

  .tracking-stat {
    min-height: 64px;
    margin-bottom: 0;
  }

  .tracking-chart {
    min-height: 160px;
    width: 100%;
    margin-bottom: 0;
  }

  .badge-card {
    width: 100%;
    margin-bottom: 0;
  }

  .settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 0.7rem 0.3rem;
  }

  .settings-grid .dashboard-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-shadow: 0 6px 24px rgba(60, 80, 180, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #dbeafe;
    background: #fff;
    padding: 1rem 0.3rem;
  }
}

/* Card background: trắng hơn, chữ đậm hơn, border rõ hơn */
.dashboard-card {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(60, 80, 180, 0.14), 0 1.5px 4px rgba(0, 0, 0, 0.04);
  border: 1.5px solid #d1d5db;
}

.dashboard-card-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(60, 80, 180, 0.08);
  padding: 1.4rem 1.1rem;
  transition: box-shadow 0.2s;
  color: #1e293b;
  font-weight: 500;
}

.dashboard-card-content:hover {
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
  background: #e0e7ef;
}

.card__header {
  color: #0f172a;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}

.card__body {
  color: #334155;
  font-size: 1rem;
  font-weight: 500;
}

.stat-content {
  color: #0f172a;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  padding: 2rem 1.5rem;
  justify-items: stretch;
  align-items: stretch;
}

.dashboard-quote {
  grid-column: 1 / 6;
}

.dashboard-tasks {
  grid-column: 1 / 6;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0.5rem;
  }

  .dashboard-quote,
  .dashboard-tasks {
    grid-column: 1 / 3;
  }
}

@media (max-width: 600px) {
  .dashboard-wrapper {
    padding: 0 0.7rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 0.5rem 1rem;
  }

  .dashboard-card-content {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .dashboard-quote,
  .dashboard-tasks {
    grid-column: 1 / 2;
  }
}

.fpt-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  width: 100%;
  flex-wrap: nowrap;
  min-height: 64px;
}

.fpt-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.fpt-header-nav {
  flex-shrink: 1;
  margin-left: 1rem;
}

.fpt-nav-menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.fpt-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
  position: absolute;
  right: 1.2rem;
  top: 1.2rem;
}

.fpt-mobile-menu-header {
  width: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #60a5fa 100%);
  color: #fff;
  border-radius: 0 0 32px 32px;
  padding: 0.6rem 0.8rem 0.6rem 0.8rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 48px;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

@media (max-width: 600px) {
  .fpt-mobile-menu-header {
    border-radius: 0 0 12px 12px;
    margin-bottom: 1.2rem;
    gap: 0.2rem;
  }
}

.fpt-mobile-menu-logo-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
  min-width: 0;
}

.fpt-mobile-menu-logo-container h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: left;
  color: #6366f1;
  flex: 0 0 auto;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fpt-mobile-menu-logo-container .fpt-tagline {
  font-size: 0.9rem;
  font-weight: 400;
  margin: 0;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  color: #334155;
  flex: 0 0 auto;
}

.fpt-close-mobile-menu {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6366f1;
  cursor: pointer;
  margin-left: 0.7rem;
  z-index: 2;
  position: static;
  align-self: center;
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .fpt-mobile-menu-logo-container {
    gap: 0.2rem;
    border-radius: 10px;
  }

  .fpt-mobile-menu-logo-container h1 {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .fpt-mobile-menu-logo-container {
    gap: 0.1rem;
    margin-top: 23px;
  }

  .fpt-mobile-menu-logo-container h1 {
    font-size: 1rem;
  }

  .fpt-mobile-menu-logo-container .fpt-tagline {
    font-size: 0.7rem;
  }
}

@media (max-width: 600px) {
  .fpt-mobile-menu-logo-container {
    gap: 0.2rem;
  }

  .fpt-mobile-menu-logo-container h1 {
    font-size: 1rem;
  }

  .fpt-mobile-menu-logo-container .fpt-tagline {
    font-size: 0.7rem;
  }
}

.fpt-close-mobile-menu {
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  margin-left: 1rem;
  z-index: 2;
  position: static;
  align-self: center;
}

@media (max-width: 600px) {
  .fpt-mobile-menu-header {
    border-radius: 0 0 18px 18px;
    padding: 0.7rem 0.7rem 0.7rem 0.7rem;
    margin-bottom: 1.2rem;
    min-height: 40px;
  }

  .fpt-mobile-menu-logo-container h1 {
    font-size: 1.1rem;
  }

  .fpt-mobile-menu-logo-container .fpt-tagline {
    font-size: 0.9rem;
    margin-left: 0.4rem;
  }

  .fpt-close-mobile-menu {
    font-size: 1.5rem;
    margin-left: 0.5rem;
  }
}

@media (max-width: 600px) {
  .fpt-mobile-menu-header {
    border-radius: 0 0 18px 18px;
    padding: 0.7rem 0.7rem 0.7rem 0.7rem;
    margin-bottom: 1.2rem;
    min-height: 40px;
  }

  .fpt-mobile-menu-logo-container h1 {
    font-size: 1.1rem;
  }

  .fpt-mobile-menu-logo-container .fpt-tagline {
    font-size: 0.9rem;
  }

  .fpt-close-mobile-menu {
    font-size: 1.5rem;
    margin-left: 0.5rem;
  }
}

@media (max-width: 900px) {
  .fpt-header-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
  }

  .fpt-logo {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }

  .fpt-header-actions {
    width: 100vw;
    justify-content: space-between;
    /* hoặc center nếu muốn căn giữa */
    padding: 0 16px;
    /* tuỳ ý */
    padding-right: 0px;
    box-sizing: border-box;
  }

  .fpt-nav-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .fpt-header-content {
    padding: 0.3rem 0.2rem;
    gap: 0.2rem;
  }

  .fpt-logo {
    font-size: 1rem;
    gap: 0.2rem;
  }
}

/* Mobile Menu Overlay Styles */

.fpt-mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 41, 59, 0.55);
  z-index: 10000;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  transition: opacity 0.3s;
  opacity: 0;
}

.fpt-mobile-menu-overlay.active {
  display: flex;
  opacity: 1;
}

.fpt-mobile-menu-content {
  background: #fff;
  border-radius: 0 0 32px 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 2.5rem 1.2rem 2rem 1.2rem;
  width: 100vw;
  height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  box-sizing: border-box;
}

.fpt-mobile-menu-header {
  width: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #60a5fa 100%);
  color: #fff;
  border-radius: 0 0 32px 32px;
  padding: 1.2rem 1.2rem 1.2rem 1.2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 56px;
}

.fpt-mobile-menu-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  text-align: left;
  letter-spacing: 0.5px;
}

.fpt-close-mobile-menu {
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  margin-left: 1rem;
  z-index: 2;
  position: static;
  align-self: flex-start;
}

@media (max-width: 600px) {
  .fpt-mobile-menu-header {
    border-radius: 0 0 18px 18px;
    padding: 0.7rem 0.7rem 0.7rem 0.7rem;
    margin-bottom: 1.2rem;
    min-height: 40px;
  }

  .fpt-mobile-menu-header h1 {
    font-size: 1.1rem;
  }

  .fpt-close-mobile-menu {
    font-size: 1.5rem;
    margin-left: 0.5rem;
    margin-top: -5px;
  }
}

.fpt-mobile-menu-logo-container {
  margin-bottom: 2rem;
}

.fpt-mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
  max-width: 340px;
}

.fpt-mobile-menu-btn {
  background: #f3f4f6;
  border: none;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  font-size: 1.1rem;
  color: #334155;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.fpt-mobile-menu-btn.active,
.fpt-mobile-menu-btn:hover {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

.fpt-mobile-menu-icon {
  font-size: 1.3rem;
}

@media (max-width: 600px) {
  .fpt-mobile-menu-content {
    padding: 1.2rem 0.2rem 1.2rem 0.2rem;
    border-radius: 0 0 18px 18px;
  }

  .fpt-mobile-menu-header {
    border-radius: 0 0 18px 18px;
    margin-bottom: 1.2rem;
  }

  .fpt-mobile-menu-list {
    gap: 0.7rem;
    max-width: 98vw;
  }

  .fpt-mobile-menu-btn {
    padding: 0.7rem 0.7rem;
    font-size: 1rem;
    border-radius: 10px;
  }
}

.fpt-close-mobile-menu {
  background: none;
  border: none;
  font-size: 2rem;
  color: #334155;
  cursor: pointer;
  position: absolute;
  right: 1.2rem;
  z-index: 2;
}

@media (max-width: 600px) {
  .fpt-mobile-menu-content {
    padding: 0;
    border-radius: 0;
    max-width: 100vw;
    max-height: 100vh;
  }
}

/* Dashboard Wrapper for Centering and Max Width */
.dashboard-wrapper {
  max-width: 1200px;
  margin: 2rem auto 2.5rem auto;
  padding: 0 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-section {
  background: #f8fafc;
  border-radius: 24px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .dashboard-wrapper {
    max-width: 98vw;
    padding: 0 0.7rem;
  }

  .dashboard-section {
    border-radius: 16px;
    margin-bottom: 1.2rem;
  }
}

@media (max-width: 600px) {
  .dashboard-wrapper {
    max-width: 100vw;
    padding: 0 0.2rem;
  }

  .dashboard-section {
    border-radius: 10px;
    margin-bottom: 0.7rem;
  }
}

/* Tab Content Modern Layout */
.tab-content {
  background: #f8fafc;
  border-radius: 24px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
  padding: 2.5rem 2rem;
  margin: 2rem auto 2.5rem auto;
  max-width: 1200px;
  min-width: 320px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .tab-content {
    padding: 1.2rem 0.7rem;
    margin: 1rem auto 1.2rem auto;
    max-width: 98vw;
  }
}

@media (max-width: 600px) {
  .tab-content {
    padding: 0.7rem 0.2rem;
    margin: 0.5rem auto 0.7rem auto;
    border-radius: 12px;
  }
}

/* Dashboard Grid Modern Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  justify-items: stretch;
  align-items: stretch;
}

.dashboard-quote,
.dashboard-online-time,
.dashboard-streak,
.dashboard-progress,
.dashboard-tasks {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.dashboard-quote {
  grid-column: 1 / 4;
}

.dashboard-tasks {
  grid-column: 1 / 4;
}

.fpt-feature-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0.5rem;
  }

  .dashboard-quote,
  .dashboard-tasks {
    grid-column: 1 / 3;
  }
}

@media (max-width: 600px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding: 0.5rem 0.2rem;
  }

  .dashboard-quote,
  .dashboard-tasks {
    grid-column: 1 / 2;
  }
}

.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  min-width: 220px;
  max-width: 340px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card__header {
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.card__body {
  width: 100%;
}

.quote-card {
  background: linear-gradient(90deg, #e0e7ff 0%, #f0fdfa 100%);
  color: #222;
  font-size: 1.15rem;
  font-weight: 500;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.quote-text {
  margin: 0;
  font-size: 1.2rem;
}

.header-stat {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  font-size: 2rem;
  color: #6366f1;
}

.stat-label {
  font-size: 1rem;
  color: #555;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #222;
}

.streak-card {
  background: linear-gradient(90deg, #fef9c3 0%, #fde68a 100%);
  color: #b45309;
}

.streak-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.streak-icon {
  font-size: 2rem;
}

.streak-info {
  display: flex;
  flex-direction: column;
}

.streak-number {
  font-size: 1.5rem;
  font-weight: 700;
}

.streak-label {
  font-size: 1rem;
}

.progress-card {
  background: linear-gradient(90deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.progress-ring-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.progress-svg {
  width: 120px;
  height: 120px;
}

.progress-track {
  stroke: #e5e7eb;
  stroke-width: 10;
  fill: none;
}

.progress-fill {
  stroke: #10b981;
  stroke-width: 10;
  fill: none;
  stroke-dasharray: 314;
  stroke-dashoffset: 78;
  /* 75% */
  transition: stroke-dashoffset 0.5s;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.progress-percentage {
  font-size: 1.3rem;
  font-weight: 700;
}

.progress-label {
  font-size: 1rem;
}

.focus-card {
  background: linear-gradient(90deg, #f3f4f6 0%, #e0e7ff 100%);
  color: #374151;
}

.task-list {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    padding: 1rem 0;
  }

  .card {
    min-width: 160px;
    max-width: 100%;
    padding: 1rem;
  }
}

@media (max-width: 600px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
  }

  .card {
    min-width: 100px;
    max-width: 100%;
    padding: 0.7rem;
  }
}

/* CSS cho form đăng nhập/đăng ký */
.auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--color-background-primary);
}

.auth-card {
  background-color: var(--color-card-background);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 450px;
  text-align: center;
}

.auth-header h2 {
  font-size: 1.8rem;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.auth-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-toggle-btn {
  background: transparent;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.auth-toggle-btn.active {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

.form-container {
  display: flex;
  flex-direction: column;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

/* Loading spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Auth form styling improvements */
.auth-toggle-btn {
  background: #f3f4f6;
  border: none;
  padding: 12px 32px;
  font-size: 1.08rem;
  cursor: pointer;
  color: #64748b;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.auth-toggle-btn:first-child {
  border-radius: 24px 0 0 24px;
}

.auth-toggle-btn:last-child {
  border-radius: 0 24px 24px 0;
}

.auth-toggle-btn.active {
  background: #6366f1;
  color: white;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

@media (max-width: 900px) {
  .fpt-menu-toggle {
    display: inline-block !important;
  }
}

@media (min-width: 901px) {
  .fpt-menu-toggle {
    display: none !important;
  }
}

@media (max-width: 900px) {

  nav.fpt-nav-menu,
  .fpt-nav-menu-list {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 900px) {
  nav.fpt-nav-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 900px) {
  .fpt-nav-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 900px) {

  .fpt-nav-menu,
  .fpt-nav-menu-list {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 900px) {

  .fpt-nav-menu ul,
  .fpt-nav-menu-list {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 900px) {
  .fpt-nav-menu-list {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
  }
}

.fpt-nav-menu-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 900px) {
  .fpt-nav-menu-list {
    display: none !important;
  }
}

/* Topbar phụ màu xanh đậm */
/* Đã bỏ ruleset rỗng .topbar */
/* FPT Telecom style reset */
body {
  font-family: 'Roboto', 'Arial', sans-serif;
  background: #f6f8fc;
  color: #222;
  margin: 0;
  padding: 0;
}

.fpt-app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.fpt-topbar {
  background: #1a237e;
  color: #fff;
  padding: 0.5rem 0;
  font-size: 15px;
}

.fpt-topbar-content {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.fpt-topbar-link {
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Header */
.fpt-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 0.5rem 0;
}

.fpt-header-content {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  justify-content: space-between;
}

.fpt-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fpt-logo-img {
  height: 36px;
  width: auto;
}

.fpt-logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a237e;
  margin-left: 0.25rem;
}

.fpt-nav-menu ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fpt-nav-link {
  color: #222;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.fpt-nav-link.active,
.fpt-nav-link:hover {
  background: #e3e8f5;
  color: #1a237e;
  cursor: pointer;
}

.fpt-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fpt-search-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #1a237e;
  margin-right: 0.5rem;
}

.fpt-menu-toggle {
  background: none;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
  color: #1a237e;
}

/* Hero Section */
.fpt-hero-section {
  background: linear-gradient(135deg, #4f8cff 0%, #6a7cff 100%);
  color: #fff;
  padding: 2.5rem 0 3.5rem 0;
  position: relative;
  text-align: center;
}

.fpt-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.fpt-hero-title span {
  font-size: 3rem;
  font-family: 'Playfair Display', cursive;
  font-weight: 400;
  letter-spacing: 2px;
}

.fpt-hero-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.fpt-hero-card {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.5rem;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.fpt-hero-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.fpt-hero-card-title {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Feature Tabs */
.fpt-feature-section {
  background: #f6f8fc;
  padding: 2rem 0 3rem 0;
}

.fpt-feature-tabs {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.fpt-feature-tab {
  color: #222;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.fpt-feature-tab.active,
.fpt-feature-tab:hover {
  background: #e3e8f5;
  color: #1a237e;
}

.fpt-feature-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.fpt-feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a237e;
  margin-bottom: 2rem;
}

.fpt-feature-cards {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.fpt-feature-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.5rem;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #222;
  border: 1px solid #e3e8f5;
}

.fpt-feature-card-point {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a237e;
}

.fpt-feature-card-badge {
  background: #ffd600;
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.3rem 1.2rem;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.fpt-feature-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2233;
  letter-spacing: 0.5px;
}

.fpt-feature-card-desc {
  font-size: 0.98rem;
  color: #3a4a5a;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Mobile Menu Overlay */
.fpt-mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.fpt-mobile-menu-overlay.active {
  display: flex;
}

.fpt-mobile-menu-content {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  margin: 2rem auto;
  padding: 1.5rem 1.2rem;
  padding-top: 0px;
}

.fpt-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.fpt-mobile-menu-logo {
  height: 32px;
  width: auto;
}

.fpt-close-mobile-menu {
  background: none;
  border: none;
  font-size: 2rem;
  color: #1a237e;
  cursor: pointer;
}

.fpt-mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fpt-mobile-menu-group-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a237e;
  margin: 1.2rem 0 0.5rem 0;
}

.fpt-mobile-menu-btn {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  color: #222;
  padding: 0.7rem 0.5rem;
  border-radius: 8px;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 500;
  transition: background 0.2s;
  cursor: pointer;
}

.fpt-mobile-menu-btn.active,
.fpt-mobile-menu-btn:hover {
  background: #e3e8f5;
  color: #1a237e;
}

.fpt-mobile-menu-icon {
  font-size: 1.3rem;
}

/* Footer */
.fpt-footer {
  background: #fff;
  border-top: 1px solid #e3e8f5;
  padding: 1.2rem 0;
  text-align: center;
  color: #1a237e;
  font-weight: 500;
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 900px) {

  .fpt-header-content,
  .fpt-topbar-content {
    padding: 0 1rem;
  }

  .fpt-feature-cards {
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
  }

  .fpt-hero-cards {
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
  }
}

@media (max-width: 600px) {

  .fpt-header-content,
  .fpt-topbar-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0 0.5rem;
  }

  .fpt-nav-menu ul {
    gap: 0.7rem;
  }

  .fpt-feature-tabs {
    gap: 0.7rem;
    font-size: 0.95rem;
  }

  .fpt-main-content {
    padding: 0 0.5rem;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Topbar phụ màu xanh đậm */
.topbar {
  width: 100%;
  background: #1a237e;
  color: #fff;
  min-height: 36px;
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.topbar-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
}

.topbar-link {
  font-weight: 500;
  cursor: pointer;
  opacity: 0.85;
}

.topbar-link:hover {
  text-decoration: underline;
  opacity: 1;
}

/* Top Navigation (Desktop) */
.top-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 2px solid #e3e6ee;
  padding: 0 32px;
  min-height: 64px;
  position: relative;
  z-index: 10;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

.nav-logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a237e;
  margin-left: 4px;
}

.nav-menu {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
}

.nav-btn {
  background: none;
  border: none;
  color: #222;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 18px 0 16px 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.nav-btn.active {
  color: #1976d2;
}

.nav-btn.active::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #1976d2 60%, #ff6f00 100%);
  border-radius: 2px;
}

.nav-btn:hover {
  color: #ff6f00;
}

.nav-search-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #222;
  margin-left: 16px;
  cursor: pointer;
}

.nav-search-icon {
  font-size: 1.5rem;
}

.nav-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: #222;
  cursor: pointer;
}

.nav-menu-icon {
  font-size: 2rem;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  z-index: 1000;
  animation: fadeIn 0.3s;
}

.mobile-menu-content {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: none;
  padding: 0 24px;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px 0;
}

.mobile-menu-logo {
  height: 36px;
  width: auto;
}

.close-mobile-menu {
  background: none;
  border: none;
  font-size: 2rem;
  color: #222;
  cursor: pointer;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-menu-group-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #1a237e;
  margin: 24px 0 8px 0;
  padding-left: 2px;
  letter-spacing: 0.01em;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: #222;
  font-size: 1.18rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  cursor: pointer;
  transition: color 0.2s;
}

.mobile-menu-btn.active {
  color: #1976d2;
}

.mobile-menu-btn.active::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #1976d2 60%, #ff6f00 100%);
  border-radius: 2px;
}

.mobile-menu-btn:hover {
  color: #ff6f00;
}

.mobile-menu-icon {
  font-size: 1.5rem;
}

@media (max-width: 900px) {
  .topbar-content {
    padding: 0 12px;
    gap: 18px;
  }

  .top-nav {
    padding: 0 12px;
  }

  .nav-menu {
    gap: 18px;
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: 28px;
    font-size: 0.95rem;
  }

  .top-nav {
    min-height: 56px;
    padding: 0 8px;
  }

  .nav-logo-img {
    height: 28px;
  }

  .nav-logo-text {
    font-size: 1.1rem;
  }

  .nav-menu {
    display: none;
  }

  .nav-search-btn {
    display: none;
  }

  .nav-menu-toggle {
    display: block;
  }

  .mobile-menu-overlay {
    display: block;
  }
}

/* Top Navigation (Desktop) */
.top-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 2px solid #e3e6ee;
  padding: 0 32px;
  min-height: 64px;
  position: relative;
  z-index: 10;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

.nav-logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a237e;
  margin-left: 4px;
}

.nav-menu {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
}

.nav-btn {
  background: none;
  border: none;
  color: #222;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 18px 0 16px 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.nav-btn.active {
  color: #1976d2;
}

.nav-btn.active::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #1976d2 60%, #ff6f00 100%);
  border-radius: 2px;
}

.nav-btn:hover {
  color: #ff6f00;
}

.nav-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: #222;
  cursor: pointer;
}

.nav-menu-icon {
  font-size: 2rem;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  z-index: 1000;
  animation: fadeIn 0.3s;
}

.mobile-menu-content {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: none;
  padding: 0 24px;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px 0;
}

.mobile-menu-logo {
  height: 36px;
  width: auto;
}

.close-mobile-menu {
  background: none;
  border: none;
  font-size: 2rem;
  color: #222;
  cursor: pointer;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: #222;
  font-size: 1.18rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  cursor: pointer;
  transition: color 0.2s;
}

.mobile-menu-btn.active {
  color: #1976d2;
}

.mobile-menu-btn.active::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #1976d2 60%, #ff6f00 100%);
  border-radius: 2px;
}

.mobile-menu-btn:hover {
  color: #ff6f00;
}

.mobile-menu-icon {
  font-size: 1.5rem;
}

@media (max-width: 900px) {
  .topbar-content {
    padding: 0 12px;
    gap: 18px;
  }

  .top-nav {
    padding: 0 12px;
  }

  .nav-menu {
    gap: 18px;
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: 28px;
    font-size: 0.95rem;
  }

  .top-nav {
    min-height: 56px;
    padding: 0 8px;
  }

  .nav-logo-img {
    height: 28px;
  }

  .nav-logo-text {
    font-size: 1.1rem;
  }

  .nav-menu {
    display: none;
  }

  .nav-menu-toggle {
    display: block;
  }

  .mobile-menu-overlay {
    display: block;
  }
}

:root {
  /* Colors */
  --color-background: rgba(252, 252, 249, 1);
  --color-surface: rgba(255, 255, 253, 1);
  --color-text: rgba(19, 52, 59, 1);
  --color-text-secondary: rgba(98, 108, 113, 1);
  --color-primary: rgba(33, 128, 141, 1);
  --color-primary-hover: rgba(29, 116, 128, 1);
  --color-primary-active: rgba(26, 104, 115, 1);
  --color-secondary: rgba(94, 82, 64, 0.12);
  --color-secondary-hover: rgba(94, 82, 64, 0.2);
  --color-secondary-active: rgba(94, 82, 64, 0.25);
  --color-border: rgba(94, 82, 64, 0.2);
  --color-btn-primary-text: rgba(252, 252, 249, 1);
  --color-card-border: rgba(94, 82, 64, 0.12);
  --color-card-border-inner: rgba(94, 82, 64, 0.12);
  --color-error: rgba(192, 21, 47, 1);
  --color-success: rgba(33, 128, 141, 1);
  --color-warning: rgba(168, 75, 47, 1);
  --color-info: rgba(98, 108, 113, 1);
  --color-focus-ring: rgba(33, 128, 141, 0.4);
  --color-select-caret: rgba(19, 52, 59, 0.8);

  /* Common style patterns */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for opacity control */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;

  /* Typography */
  --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: rgba(31, 33, 33, 1);
    --color-surface: rgba(38, 40, 40, 1);
    --color-text: rgba(245, 245, 245, 1);
    --color-text-secondary: rgba(167, 169, 169, 0.7);
    --color-primary: rgba(50, 184, 198, 1);
    --color-primary-hover: rgba(45, 166, 178, 1);
    --color-primary-active: rgba(41, 150, 161, 1);
    --color-secondary: rgba(119, 124, 124, 0.15);
    --color-secondary-hover: rgba(119, 124, 124, 0.25);
    --color-secondary-active: rgba(119, 124, 124, 0.3);
    --color-border: rgba(119, 124, 124, 0.3);
    --color-error: rgba(255, 84, 89, 1);
    --color-success: rgba(50, 184, 198, 1);
    --color-warning: rgba(230, 129, 97, 1);
    --color-info: rgba(167, 169, 169, 1);
    --color-focus-ring: rgba(50, 184, 198, 0.4);
    --color-btn-primary-text: rgb(240, 244, 245);
    --color-card-border: rgba(119, 124, 124, 0.2);
    --color-card-border-inner: rgba(119, 124, 124, 0.15);
    --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    --button-border-secondary: rgba(119, 124, 124, 0.2);
    --color-border-secondary: rgba(119, 124, 124, 0.2);
    --color-select-caret: rgba(245, 245, 245, 0.8);

    /* Common style patterns - updated for dark mode */
    --focus-ring: 0 0 0 3px var(--color-focus-ring);
    --focus-outline: 2px solid var(--color-primary);
    --status-bg-opacity: 0.15;
    --status-border-opacity: 0.25;
    --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    /* RGB versions for dark mode */
    --color-success-rgb: 50, 184, 198;
    --color-error-rgb: 255, 84, 89;
    --color-warning-rgb: 230, 129, 97;
    --color-info-rgb: 167, 169, 169;
  }
}

/* Data attribute for manual theme switching */
[data-color-scheme="dark"] {
  --color-background: rgba(31, 33, 33, 1);
  --color-surface: rgba(38, 40, 40, 1);
  --color-text: rgba(245, 245, 245, 1);
  --color-text-secondary: rgba(167, 169, 169, 0.7);
  --color-primary: rgba(50, 184, 198, 1);
  --color-primary-hover: rgba(45, 166, 178, 1);
  --color-primary-active: rgba(41, 150, 161, 1);
  --color-secondary: rgba(119, 124, 124, 0.15);
  --color-secondary-hover: rgba(119, 124, 124, 0.25);
  --color-secondary-active: rgba(119, 124, 124, 0.3);
  --color-border: rgba(119, 124, 124, 0.3);
  --color-error: rgba(255, 84, 89, 1);
  --color-success: rgba(50, 184, 198, 1);
  --color-warning: rgba(230, 129, 97, 1);
  --color-info: rgba(167, 169, 169, 1);
  --color-focus-ring: rgba(50, 184, 198, 0.4);
  --color-btn-primary-text: rgba(19, 52, 59, 1);
  --color-card-border: rgba(119, 124, 124, 0.15);
  --color-card-border-inner: rgba(119, 124, 124, 0.15);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  --color-border-secondary: rgba(119, 124, 124, 0.2);
  --color-select-caret: rgba(245, 245, 245, 0.8);

  /* Common style patterns - updated for dark mode */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for dark mode */
  --color-success-rgb: 50, 184, 198;
  --color-error-rgb: 255, 84, 89;
  --color-warning-rgb: 230, 129, 97;
  --color-info-rgb: 167, 169, 169;
}

[data-color-scheme="light"] {
  --color-background: rgba(252, 252, 249, 1);
  --color-surface: rgba(255, 255, 253, 1);
  --color-text: rgba(19, 52, 59, 1);
  --color-text-secondary: rgba(98, 108, 113, 1);
  --color-primary: rgba(33, 128, 141, 1);
  --color-primary-hover: rgba(29, 116, 128, 1);
  --color-primary-active: rgba(26, 104, 115, 1);
  --color-secondary: rgba(94, 82, 64, 0.12);
  --color-secondary-hover: rgba(94, 82, 64, 0.2);
  --color-secondary-active: rgba(94, 82, 64, 0.25);
  --color-border: rgba(94, 82, 64, 0.2);
  --color-btn-primary-text: rgba(252, 252, 249, 1);
  --color-card-border: rgba(94, 82, 64, 0.12);
  --color-card-border-inner: rgba(94, 82, 64, 0.12);
  --color-error: rgba(192, 21, 47, 1);
  --color-success: rgba(33, 128, 141, 1);
  --color-warning: rgba(168, 75, 47, 1);
  --color-info: rgba(98, 108, 113, 1);
  --color-focus-ring: rgba(33, 128, 141, 0.4);

  /* RGB versions for light mode */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;
}

/* Base styles */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  /* color: var(--color-text); */
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-md);
}

p {
  margin: 0 0 var(--space-16) 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

code,
pre {
  font-family: var(--font-family-mono);
  font-size: calc(var(--font-size-base) * 0.95);
  background-color: var(--color-secondary);
  border-radius: var(--radius-sm);
}

code {
  padding: var(--space-1) var(--space-4);
}

pre {
  padding: var(--space-16);
  margin: var(--space-16) 0;
  overflow: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-btn-primary-text);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--primary:active {
  background: var(--color-primary-active);
}

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-text);
}

.btn--secondary:hover {
  background: var(--color-secondary-hover);
}

.btn--secondary:active {
  background: var(--color-secondary-active);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--outline:hover {
  background: var(--color-secondary);
}

.btn--sm {
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: var(--space-10) var(--space-20);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
}

.btn--full-width {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form elements */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.form-control {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

select.form-control {
  padding: var(--space-8) var(--space-12);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-caret-light);
  background-repeat: no-repeat;
  background-position: right var(--space-12) center;
  background-size: 16px;
  padding-right: var(--space-32);
}

/* Add a dark mode specific caret */
@media (prefers-color-scheme: dark) {
  select.form-control {
    background-image: var(--select-caret-dark);
  }
}

/* Also handle data-color-scheme */
[data-color-scheme="dark"] select.form-control {
  background-image: var(--select-caret-dark);
}

[data-color-scheme="light"] select.form-control {
  background-image: var(--select-caret-light);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: var(--focus-outline);
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.form-group {
  margin-bottom: var(--space-16);
}

/* Card component */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-standard);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__body {
  padding: var(--space-16);
}

.card__header,
.card__footer {
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-card-border-inner);
}

/* Status indicators - simplified with CSS variables */
.status {
  display: inline-flex;
  align-items: center;
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.status--success {
  background-color: rgba(var(--color-success-rgb, 33, 128, 141),
      var(--status-bg-opacity));
  color: var(--color-success);
  border: 1px solid rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
}

.status--error {
  background-color: rgba(var(--color-error-rgb, 192, 21, 47),
      var(--status-bg-opacity));
  color: var(--color-error);
  border: 1px solid rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
}

.status--warning {
  background-color: rgba(var(--color-warning-rgb, 168, 75, 47),
      var(--status-bg-opacity));
  color: var(--color-warning);
  border: 1px solid rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
}

.status--info {
  background-color: rgba(var(--color-info-rgb, 98, 108, 113),
      var(--status-bg-opacity));
  color: var(--color-info);
  border: 1px solid rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
}

/* Container layout */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-16);
  padding-left: var(--space-16);
}

@media (min-width: 640px) {
  .container {
    max-width: var(--container-sm);
  }
}

@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

/* Utility classes */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: var(--space-4);
}

.gap-8 {
  gap: var(--space-8);
}

.gap-16 {
  gap: var(--space-16);
}

.m-0 {
  margin: 0;
}

.mt-8 {
  margin-top: var(--space-8);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mx-8 {
  margin-left: var(--space-8);
  margin-right: var(--space-8);
}

.my-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.p-0 {
  padding: 0;
}

.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.px-16 {
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

.block {
  display: block;
}

.hidden {
  display: none;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Dark mode specifics */
[data-color-scheme="dark"] .btn--outline {
  border: 1px solid var(--color-border-secondary);
}

@font-face {
  font-family: 'FKGroteskNeue';
  src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2') format('woff2');
}

/* App-specific styles */
:root {
  /* Override design system colors with app-specific colors */
  --color-primary: #00003D;
  --color-primary-hover: #000033;
  --color-primary-active: #000029;
  --color-secondary: #FFA500;
  --color-success: #32CD32;
  --color-warning: #FFA500;
  --color-accent: #FF6B6B;

  /* App-specific variables */
  --app-header-height: 70px;
  --app-sidebar-width: 250px;
  --app-sidebar-mobile-width: 60px;
}

/* Global App Styles */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-background);
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--color-primary), #1a1a5e);
  color: white;
  padding: var(--space-16);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo h1 {
  color: white;
  font-size: var(--font-size-3xl);
  margin: 0;
  font-weight: var(--font-weight-bold);
}

.tagline {
  font-size: var(--font-size-sm);
  opacity: 0.9;
  display: block;
  margin-top: var(--space-4);
}

.header-actions .btn {
  background: var(--color-secondary);
  color: white;
  border: none;
  font-weight: var(--font-weight-medium);
  transition: all var(--duration-normal) var(--ease-standard);
}

.header-actions .btn:hover {
  background: #e8940a;
  transform: translateY(-2px);
}

/* Main Layout */
.main-layout {
  display: flex;
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background: var(--color-card-background);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
  border-radius: 32px;
  padding: 32px 0 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 40px;
  min-height: 600px;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

/* Đã bỏ ruleset rỗng .nav-item */

.nav-btn {
  width: 100%;
  background: #fff;
  border: none;
  color: #222;
  font-size: 1.18rem;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 32px;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 111, 0, 0.04);
  position: relative;
}

.nav-btn:hover {
  background: linear-gradient(90deg, #fff3e0 0%, #ffe0b2 100%);
  color: #ff6f00;
  box-shadow: 0 8px 24px rgba(255, 111, 0, 0.12);
}

.nav-btn.active {
  background: linear-gradient(90deg, #ff9800 0%, #ff6f00 100%);
  color: #fff;
  box-shadow: 0 8px 32px rgba(255, 111, 0, 0.18);
}

.nav-icon {
  font-size: 2rem;
  margin-right: 0px;
  filter: drop-shadow(0 2px 4px rgba(255, 111, 0, 0.10));
}

.nav-text {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 8px;
}

/* Đã bỏ đoạn thừa không thuộc selector nào */
.sidebar-menu-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #fff 80%, #f5f7fa 100%);
  border-radius: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  padding: 0 0 16px 0;
  /* Đã bỏ các dấu đóng ngoặc thừa không thuộc selector hay at-rule nào */

  .sidebar-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
  }

  .sidebar-logo-img {
    width: 120px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
}

/* Main Content */
.main-content {
  flex: 1;
  padding: var(--space-24);
  overflow-y: auto;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Home Tab Styles */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-24);
  margin-bottom: var(--space-32);
}

.quote-card {
  background: linear-gradient(135deg, var(--color-secondary), #ffb347);
  color: white;
  text-align: center;
}

.quote-text {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  margin: 0;
}

.streak-card {
  background: linear-gradient(135deg, var(--color-accent), #ff8a80);
  color: white;
}

.streak-content {
  display: flex;
  align-items: center;
  gap: var(--space-16);
}

.streak-icon {
  font-size: 3rem;
}

.streak-number {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  display: block;
}

.streak-label {
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

.progress-card {
  background: linear-gradient(135deg, var(--color-success), #90ee90);
  color: white;
}

.progress-ring-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.progress-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-track {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 8;
}

.progress-fill {
  fill: none;
  stroke: white;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 78.5;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.progress-percentage {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  display: block;
}

.progress-label {
  font-size: var(--font-size-xs);
  opacity: 0.9;
}

.focus-card {
  grid-column: 1 / -1;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.task-item {
  display: flex;
  align-items: center;
  padding: var(--space-12);
  background: var(--color-background);
  border-radius: var(--radius-base);
  border: 1px solid var(--color-border);
  transition: all var(--duration-normal) var(--ease-standard);
}

.task-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.task-checkbox {
  margin-right: var(--space-12);
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.task-content {
  flex: 1;
}

.task-title {
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-4);
}

.task-meta {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.task-priority {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-8);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.task-item.completed {
  opacity: 0.6;
}

.task-item.completed .task-title {
  text-decoration: line-through;
}

/* Planning Tab Styles */
.planning-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-24);
}

.task-creator-card {
  height: fit-content;
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
}

.priority-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}

.priority-option {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-base);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
}

.priority-option:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.priority-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
}

.priority-text {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.task-filters {
  display: flex;
  gap: var(--space-12);
}

.task-filters .form-control {
  min-width: 150px;
}

.all-tasks-list {
  max-height: 600px;
  overflow-y: auto;
}

/* Tracking Tab Styles */
.tracking-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-20);
}

.stat-card {
  background: linear-gradient(135deg, var(--color-primary), #1a1a5e);
  color: white;
  border: none;
}

.stat-content {
  display: flex;
  align-items: center;
  gap: var(--space-16);
}

.stat-icon {
  font-size: 2.5rem;
  opacity: 0.9;
}

.stat-number {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  display: block;
}

.stat-label {
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-24);
}

.chart-container {
  position: relative;
  height: 300px;
}

.badge-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  justify-items: stretch;
  align-items: stretch;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .badge-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

.badge-item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 20px 12px;
  background: #f9fafb;
  border-radius: 16px;
  border: 1.5px solid #cbd5e1;
  min-width: 120px;
  height: 170px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}

.badge-item:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px) scale(1.04);
}

.badge-item.locked {
  position: relative;
  background: #0b0b0b;
  border: 1.5px dashed #cbd5e1;
  color: #94a3b8;
  box-shadow: none;
  opacity: 0.65;
  pointer-events: none;
}

.badge-item.locked .badge-icon {
  color: #b0b6c2;
  opacity: 0.7;
}

.badge-item.locked .badge-name,
.badge-item.locked .badge-desc {
  color: #94a3b8;
  font-weight: 500;
}

.badge-item.locked:hover {
  box-shadow: none;
  transform: none;
}

.badge-item.locked::after {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.1rem;
  color: #b0b6c2;
  opacity: 0.8;
  pointer-events: none;
}

.badge-icon {
  font-size: 2rem;
  margin-bottom: var(--space-8);
  color: #6366f1;
}

.badge-name {
  font-size: var(--font-size-sm);
  color: #222;
  font-weight: 600;
  font-weight: var(--font-weight-medium);
}

/* Settings Tab Styles */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.profile-section {
  display: flex;
  align-items: center;
  gap: var(--space-24);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.pomodoro-presets {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.preset-option {
  padding: var(--space-16);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-base);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
}

.preset-option:hover {
  border-color: var(--color-primary);
}

.preset-option.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
}

.preset-option h4 {
  margin: 0 0 var(--space-8) 0;
  font-size: var(--font-size-lg);
}

.preset-option p {
  margin: 0;
  font-size: var(--font-size-sm);
  opacity: 0.8;
}

.subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.subject-tag {
  padding: var(--space-8) var(--space-12);
  background: var(--color-secondary);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

/* Footer */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16);
  text-align: center;
  color: #334155;
  font-weight: 500;
  font-size: var(--font-size-sm);
}

/* Timer Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-20);
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  margin: 0;
  color: var(--color-text);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-standard);
}

.modal-close:hover {
  background: var(--color-secondary-hover);
  color: var(--color-text);
}

.modal-body {
  padding: var(--space-24);
}

.timer-display {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-24);
}

.timer-circle {
  position: relative;
  width: 200px;
  height: 200px;
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-track {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 8;
}

.timer-progress {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 628;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-time {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  display: block;
  color: var(--color-text);
  font-family: var(--font-family-mono);
}

.timer-session {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-8);
  display: block;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  margin-bottom: var(--space-20);
}

.timer-info {
  text-align: center;
  color: var(--color-text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    display: flex;
    overflow-x: auto;
    padding: var(--space-16);
  }

  .nav-menu {
    display: flex;
    gap: var(--space-8);
  }

  .nav-item {
    margin-bottom: 0;
    min-width: max-content;
  }

  .nav-btn {
    flex-direction: column;
    padding: var(--space-12);
    margin-right: 0;
    border-radius: var(--radius-base);
    text-align: center;
    min-width: 80px;
  }

  .nav-text {
    font-size: var(--font-size-xs);
    margin-top: var(--space-4);
  }

  .nav-icon {
    margin-right: 0;
    margin-bottom: var(--space-4);
  }

  .main-content {
    padding: var(--space-16);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: var(--space-16);
    padding-left: 15px;
    padding-right: 15px;
  }

  .planning-container {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .priority-matrix {
    grid-template-columns: 1fr;
  }

  .timer-circle {
    width: 150px;
    height: 150px;
  }

  .timer-time {
    font-size: var(--font-size-3xl);
  }

  .modal-content {
    margin: var(--space-16);
  }
}

@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
    gap: var(--space-12);
    text-align: center;
  }

  .tagline {
    margin-top: var(--space-2);
  }

  .streak-content {
    flex-direction: column;
    text-align: center;
  }

  .stat-content {
    flex-direction: column;
    text-align: center;
  }

  .profile-section {
    flex-direction: column;
    text-align: center;
  }

  .timer-controls {
    flex-direction: column;
    align-items: center;
  }

  .timer-controls .btn {
    width: 100%;
    max-width: 200px;
  }
}

/* Animation for completed tasks */
.task-item.completing {
  animation: taskComplete 0.5s ease-out;
}

@keyframes taskComplete {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
    background: var(--color-success);
  }

  100% {
    transform: scale(1);
  }
}

/* Pulse animation for active timer */
.timer-circle.active .timer-progress {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Thêm các định nghĩa CSS cho hình nền */

/* Hình nền cho body */
.theme-body {
  background-image: url('images/hs.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transition: background-image 0.5s ease;
}

/* Hình nền cho Sidebar (chỉ áp dụng ở Trang chủ) */
.theme-sidebar {
  background-image: url('images/hs1.jpg');
  background-size: cover;
  background-position: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hình nền cho Dashboard (chỉ áp dụng ở Trang chủ) */
.theme-dashboard-grid {
  background-image: url('images/thu.jpg');
  background-size: cover;
  background-position: center;
  padding: 20px;
  border-radius: 16px;
}

/* Các hình nền cho từng tab */
/* Hình nền cho tab Lập kế hoạch */
.bg-planning {
  background-image: url('images/ha.jpg');
}

/* Hình nền cho tab Theo dõi */
.bg-tracking {
  background-image: url('images/xuan.jpg');
}

/* Hình nền cho tab Cài đặt */
.bg-settings {
  background-image: url('images/dong.jpg');
}

/* Freedcamp note UI nâng cấp */
.freedcamp-note-card {
  background: linear-gradient(135deg, #f8fafc 60%, #e0e7ff 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.13);
  padding: 22px 28px;
  margin-bottom: 22px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  font-size: 1.12rem;
  color: #222;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1.5px solid #e0e7ff;
}

.freedcamp-note-card:hover {
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.18);
  transform: translateY(-2px) scale(1.02);
}

.freedcamp-note-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  margin-right: 8px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.10);
}

.freedcamp-note-delete {
  background: #f44336;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.freedcamp-note-delete:hover {
  background: #d32f2f;
}

.freedcamp-notification {
  position: relative;
  z-index: 2;
}

.freedcamp-noti-msg {
  background: linear-gradient(90deg, #6366f1 60%, #60a5fa 100%);
  color: #fff;
  padding: 13px 24px;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.13);
  font-weight: 600;
  font-size: 1.08rem;
  animation: freedcampFadeIn 0.3s;
  letter-spacing: 0.5px;
}

@keyframes freedcampFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= QUIZ NAVIGATION STYLES ================= */
.app-nav {
  background: white;
  padding: 15px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-btn {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-btn:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

/* Mobile responsive for nav */
@media (max-width: 768px) {
  .app-nav {
    padding: 10px;
    gap: 10px;
  }
  
  .nav-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .nav-btn span {
    font-size: 16px;
  }
}

/* Quiz button animation */
@keyframes quizButtonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

/* ================= PERSONAL INFO MODAL STYLES ================= */
.personal-info-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
  animation: modalOverlayFadeIn 0.3s ease-out;
}

.personal-info-modal-overlay.active {
  display: flex;
}

@keyframes modalOverlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.personal-info-modal-content {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalContentSlideIn 0.4s ease-out;
  border: 1px solid #e5e7eb;
}

@keyframes modalContentSlideIn {
  from {
    opacity: 0;
    transform: translateY(-40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.personal-info-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 32px;
  border-bottom: 2px solid #f1f5f9;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border-radius: 24px 24px 0 0;
}

.personal-info-modal-header h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.personal-info-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.personal-info-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.personal-info-modal-body {
  padding: 32px;
}

/* Tab Navigation */
.personal-info-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  background: #f8fafc;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

.personal-info-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #64748b;
  position: relative;
}

.personal-info-tab.active {
  background: #6366f1;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.personal-info-tab:hover:not(.active) {
  background: #e2e8f0;
  color: #475569;
}

/* Tab Content */
.personal-info-tab-content {
  display: none;
  animation: tabContentFadeIn 0.3s ease-out;
}

.personal-info-tab-content.active {
  display: block;
}

@keyframes tabContentFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress Bar */
.personal-info-progress {
  margin-bottom: 32px;
  background: #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.personal-info-progress-bar {
  height: 8px;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease;
  position: relative;
}

.personal-info-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.personal-info-progress-text {
  padding: 12px 16px;
  font-size: 0.95rem;
  color: #475569;
  font-weight: 600;
  text-align: center;
}

/* Form Grid */
.personal-info-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* Form Group */
.personal-info-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.personal-info-form-group label {
  font-weight: 600;
  color: #334155;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.personal-info-form-group label .icon {
  color: #6366f1;
  font-size: 1.1rem;
}

/* Form Controls */
.personal-info-form-control {
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #ffffff;
  color: #1e293b;
  font-family: inherit;
}

.personal-info-form-control:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: #fefefe;
}

.personal-info-form-control:invalid {
  border-color: #ef4444;
}

.personal-info-form-control:invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Textarea Specific */
textarea.personal-info-form-control {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* Select Specific */
select.personal-info-form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 44px;
}

/* Tag Input */
.personal-info-tag-input-container {
  position: relative;
}

.personal-info-tags-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  min-height: 50px;
  align-items: flex-start;
  align-content: flex-start;
}

.personal-info-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: tagSlideIn 0.3s ease-out;
}

@keyframes tagSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.personal-info-tag-remove {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.personal-info-tag-remove:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

/* Validation Messages */
.personal-info-validation-message {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: validationSlideIn 0.3s ease-out;
}

@keyframes validationSlideIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.personal-info-validation-message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.personal-info-validation-message.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* Action Buttons */
.personal-info-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 2px solid #f1f5f9;
  margin-top: 32px;
}

.personal-info-btn {
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
}

.personal-info-btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.personal-info-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.personal-info-btn-secondary {
  background: #f8fafc;
  color: #475569;
  border: 2px solid #e2e8f0;
}

.personal-info-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.personal-info-btn-danger {
  background: #ef4444;
  color: white;
}

.personal-info-btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

/* Loading State */
.personal-info-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.personal-info-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: buttonSpinner 1s linear infinite;
  margin-left: 8px;
}

@keyframes buttonSpinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ================= BASIC INFO DISPLAY STYLES ================= */
.info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.info-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.info-item label {
  font-weight: 600;
  color: #334155;
  font-size: 0.95rem;
  min-width: 100px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-item span {
  color: #475569;
  font-size: 0.95rem;
  text-align: right;
  flex: 1;
  margin-left: 12px;
}

.info-item span:empty::after {
  content: "Chưa cập nhật";
  color: #94a3b8;
  font-style: italic;
}

#manage-detailed-info-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

/* Mobile responsive for basic info display */
@media (max-width: 768px) {
  .info-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
  }
  
  .info-item label {
    min-width: auto;
    margin-bottom: 4px;
  }
  
  .info-item span {
    text-align: left;
    margin-left: 0;
    width: 100%;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .personal-info-modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
  }
  
  .personal-info-modal-header {
    padding: 20px;
    border-radius: 0;
  }
  
  .personal-info-modal-header h3 {
    font-size: 1.5rem;
  }
  
  .personal-info-modal-body {
    padding: 20px;
  }
  
  .personal-info-form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .personal-info-tabs {
    flex-direction: column;
    gap: 4px;
  }
  
  .personal-info-tab {
    padding: 12px 16px;
    font-size: 1rem;
  }
  
  .personal-info-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .personal-info-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }
}

@media (max-width: 480px) {
  .personal-info-modal-header {
    padding: 16px;
  }
  
  .personal-info-modal-body {
    padding: 16px;
  }
  
  .personal-info-form-grid {
    gap: 16px;
  }
  
  .personal-info-tags-display {
    padding: 8px;
  }
  
  .personal-info-tag {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

.quiz-btn.pulse {
  animation: quizButtonPulse 2s infinite;
}

/* ========================================
   BRAIN QUIZ INTEGRATED STYLES
   ======================================== */

/* Brain Quiz Overlay */
.brain-quiz-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
}

.brain-quiz-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Brain Quiz Header */
.brain-quiz-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.brain-quiz-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.brain-quiz-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Progress Bar */
.progress-container {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    height: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Quiz Content */
.quiz-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Modernized Brain Character */
.brain-character {
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 8px 24px rgba(102, 126, 234, 0.15));
}

.brain-character:hover {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 16px 40px rgba(102, 126, 234, 0.25));
}

.brain-body {
    width: 100px;
    height: 80px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    border-radius: 50% 50% 45% 45%;
    position: relative;
    margin: 0 auto;
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    animation: modernBrainFloat 4s ease-in-out infinite;
    overflow: hidden;
}

.brain-body::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 15px;
    width: 30px;
    height: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 50% 50% 30% 50%;
    transform: rotate(-20deg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.brain-body::after {
    content: '';
    position: absolute;
    top: -8px;
    right: 10px;
    width: 35px;
    height: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 50% 50% 50% 30%;
    transform: rotate(15deg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.brain-eyes {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.brain-eye {
    width: 14px;
    height: 14px;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border-radius: 50%;
    position: relative;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.brain-eye::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background: linear-gradient(145deg, #1e293b, #475569);
    border-radius: 50%;
    animation: modernBrainBlink 5s infinite;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.brain-mouth {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-top: none;
    border-radius: 0 0 22px 22px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 3;
}

/* Modernized Brain States */
.brain-character.thinking .brain-body {
    background: linear-gradient(145deg, #10b981, #059669);
    animation: modernBrainThink 2s ease-in-out infinite;
}

.brain-character.happy .brain-body {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    animation: modernBrainBounce 1.2s ease-in-out infinite;
}

.brain-character.completed .brain-body {
    background: linear-gradient(145deg, #8b5cf6, #7c3aed);
    animation: modernBrainCelebrate 1.5s ease-in-out infinite;
}

/* Question Container */
.question-container {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.question-number {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.4;
}

.question-note {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-style: italic;
    line-height: 1.5;
}

/* Likert Scale Options */
.likert-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.likert-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
}

.likert-option:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76,175,80,0.2);
}

.likert-option.selected {
    border-color: #4CAF50;
    background: #f8fff8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

.likert-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.likert-option.selected .likert-number {
    background: #4CAF50;
    color: white;
}

.likert-text {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    line-height: 1.2;
}

.likert-option.selected .likert-text {
    color: #2d5a2f;
    font-weight: 600;
}

/* Navigation Buttons */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.quiz-nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.quiz-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-nav-btn.prev-btn {
    background: #6c757d;
    color: white;
}

.quiz-nav-btn.prev-btn:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

.quiz-nav-btn.next-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.quiz-nav-btn.next-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76,175,80,0.4);
}

/* Results Screen */
.results-container {
    text-align: center;
    padding: 20px;
}

.personality-result {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
}

.personality-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.personality-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.personality-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
}

.scores-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.score-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.score-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: 500;
}

.score-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.score-description {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Animations */
@keyframes brainFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes brainThink {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes brainBounce {
    0%, 100% { transform: translateY(0px); }
    25% { transform: translateY(-5px); }
    50% { transform: translateY(0px); }
    75% { transform: translateY(-3px); }
}

@keyframes brainCelebrate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-5deg) scale(1.1); }
    50% { transform: rotate(0deg) scale(1.2); }
    75% { transform: rotate(5deg) scale(1.1); }
}

@keyframes brainBlink {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0; }
}

/* Close Button */
.brain-quiz-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #666;
    transition: all 0.3s ease;
    z-index: 10000;
}

.brain-quiz-close:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
    color: #333;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .brain-quiz-fullscreen {
        padding: 15px;
    }
    
    .quiz-content {
        padding: 20px;
    }
    
    .brain-quiz-title {
        font-size: 1.5rem;
    }
    
    .brain-character {
        width: 120px;
        height: 120px;
    }
    
    .brain-body {
        width: 80px;
        height: 65px;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .likert-options {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .likert-option {
        padding: 12px 8px;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .quiz-nav-btn {
        width: 100%;
        padding: 15px;
    }
    
    .scores-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .personality-title {
        font-size: 1.5rem;
    }
    
    .personality-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .brain-quiz-fullscreen {
        padding: 10px;
    }
    
    .quiz-content {
        padding: 15px;
    }
    
    .brain-quiz-title {
        font-size: 1.3rem;
    }
    
    .likert-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brain-quiz-close {
        width: 35px;
        height: 35px;
        font-size: 16px;
        top: 15px;
        right: 15px;
    }
}

/* ================= QUIZ STYLES ================= */
.quiz-section {
    padding: 2rem 1.5rem;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Quiz Topic Selection */
.quiz-topics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.quiz-topic-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
}

.quiz-topic-btn:hover {
    border-color: #6366f1;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.quiz-topic-btn:active {
    transform: translateY(0);
}

/* Quiz Game Styles */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.quiz-progress {
    flex: 1;
    margin-right: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
}

.quiz-timer {
    background: #ff6b6b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 60px;
    text-align: center;
}

.quiz-timer.warning {
    background: #ff9f40;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.quiz-question-container {
    margin-bottom: 2rem;
}

.quiz-question {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.quiz-answers {
    display: grid;
    gap: 0.75rem;
}

.quiz-answer {
    padding: 1rem 1.25rem;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    text-align: left;
}

.quiz-answer:hover {
    border-color: #6366f1;
    background: #f8fafc;
}

.quiz-answer.selected {
    border-color: #6366f1;
    background: #eef2ff;
}

.quiz-answer.correct {
    border-color: #10b981;
    background: #ecfdf5;
    color: #065f46;
}

.quiz-answer.incorrect {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.quiz-answer.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* ================= MODERNIZED QUIZ RESULTS STYLES ================= */
.quiz-results-container {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 32px;
    padding: 3rem 2.5rem;
    box-shadow: 
        0 25px 50px rgba(102, 126, 234, 0.08),
        0 12px 24px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: resultsSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes resultsSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quiz-results-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.08), transparent);
    animation: resultsShine 4s infinite;
    z-index: 1;
}

@keyframes resultsShine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.quiz-results-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.quiz-results-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
}

.quiz-results-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 2rem;
}

.quiz-score-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.score-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    position: relative;
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.3),
        0 8px 16px rgba(118, 75, 162, 0.2);
    animation: scoreGlow 3s ease-in-out infinite;
}

@keyframes scoreGlow {
    0%, 100% { 
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3), 0 8px 16px rgba(118, 75, 162, 0.2);
    }
    50% { 
        box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4), 0 12px 24px rgba(118, 75, 162, 0.3);
    }
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2, #667eea);
    animation: scoreRotate 8s linear infinite;
    z-index: -1;
    opacity: 0.6;
}

@keyframes scoreRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.score-value {
    font-size: 3.5rem;
    line-height: 1;
    font-weight: 900;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.score-total {
    font-size: 1.4rem;
    opacity: 0.9;
    font-weight: 600;
    margin-top: 0.5rem;
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-self: stretch;
}

.score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(102, 126, 234, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.score-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    transition: width 0.3s ease;
}

.score-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
}

.score-item.correct {
    color: #059669;
}

.score-item.correct::before {
    background: linear-gradient(135deg, #10b981, #059669);
}

.score-item.correct:hover::before {
    width: 100%;
    opacity: 0.1;
}

.score-item.incorrect {
    color: #dc2626;
}

.score-item.incorrect::before {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.score-item.incorrect:hover::before {
    width: 100%;
    opacity: 0.1;
}

.score-item.skipped {
    color: #d97706;
}

.score-item.skipped::before {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.score-item.skipped:hover::before {
    width: 100%;
    opacity: 0.1;
}

.quiz-performance {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.05), rgba(255, 255, 255, 0.8));
    padding: 2.5rem;
    border-radius: 24px;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
}

.performance-message {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.performance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.08);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
}

.stat-label {
    color: #64748b;
    font-weight: 600;
    font-size: 1rem;
}

.stat-value {
    color: #1e293b;
    font-weight: 800;
    font-size: 1.3rem;
}

.quiz-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    margin-top: 2rem;
}

.quiz-action-btn {
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-action-btn--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.quiz-action-btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.quiz-action-btn--secondary {
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    color: #475569;
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quiz-action-btn--secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .quiz-section {
        padding: 1rem;
    }
    
    .quiz-topics {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .quiz-topic-btn {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .quiz-progress {
        margin-right: 0;
    }
    
    .quiz-timer {
        align-self: center;
    }
    
    .quiz-question {
        font-size: 1.1rem;
    }
    
    .quiz-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quiz-controls .btn {
        width: 100%;
    }
    
    .quiz-score-summary {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-value {
        font-size: 2rem;
    }
    
    .performance-stats {
        grid-template-columns: 1fr;
    }
    
    .quiz-actions {
        flex-direction: column;
    }
    
    .quiz-actions .btn {
        width: 100%;
    }
}

/* ================= MANDATORY QUIZ OVERLAY ================= */
.mandatory-quiz-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.mandatory-quiz-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.mandatory-quiz-overlay .brain-assessment-intro,
.mandatory-quiz-overlay .symptoms-check,
.mandatory-quiz-overlay .assessment-questions,
.mandatory-quiz-overlay .assessment-results {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Thêm hiệu ứng shine cho assessment-questions */
.mandatory-quiz-overlay .assessment-questions::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
    z-index: 1;
}

@keyframes shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.mandatory-quiz-overlay .assessment-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 20px 20px 0 0;
}

.mandatory-quiz-overlay .assessment-header h2 {
    color: white;
    margin-bottom: 1rem;
}

.mandatory-quiz-overlay .btn--large {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 1.25rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.mandatory-quiz-overlay .btn--large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* ================= BRAIN ASSESSMENT STYLES ================= */
.brain-assessment-section {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

.brain-assessment-intro, 
.symptoms-check, 
.assessment-questions, 
.assessment-results,
.recommendations {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.assessment-header {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.assessment-header h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.assessment-header p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    opacity: 0.9;
}

.brain-character {
    margin-bottom: 1rem;
}

.brain-message {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
    color: #1e293b;
    padding: 1.5rem 2rem;
    border-radius: 24px;
    margin: 1.5rem 0;
    font-size: 1.1rem;
    position: relative;
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.5) inset;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.brain-message:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.brain-message::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 24px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 4px 6px rgba(102, 126, 234, 0.08));
}

/* Symptoms List */
.symptoms-list {
    padding: 1.5rem;
    background: #f8fafc;
}

.symptom-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-size: 1rem;
    color: #64748b;
}

.symptom-item:last-child {
    margin-bottom: 0;
}

/* Question Styles */
.question-progress {
    padding: 1rem 1.5rem;
    background: #f8fafc;
}

/* Specific styling for mandatory quiz progress section */
.mandatory-quiz-question-progress {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    position: relative;
    z-index: 2;
    display: block !important;
    visibility: visible !important;
    min-height: 60px;
    box-sizing: border-box;
}

.mandatory-quiz-question-progress::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.question-container {
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    z-index: 2;
}

.question-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.question-emoji {
    margin-bottom: 1.5rem;
    position: relative;
}

.question-emoji img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.1));
    animation: floatEmoji 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.question-emoji img:hover {
    transform: scale(1.1) rotate(5deg);
}

.question-title {
    font-size: 1.4rem;
    color: #1e293b;
    margin-bottom: 2rem;
    line-height: 1.6;
    text-align: center;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

@keyframes floatEmoji {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.question-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2rem;
    text-align: center;
    font-style: normal;
    font-weight: 500;
    background: rgba(102, 126, 234, 0.1);
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.question-subtitle::before {
    content: '💡';
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Likert Scale */
.likert-scale {
    margin: 3rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.likert-options {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.likert-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 0.6rem;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.likert-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.likert-option:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.likert-option:hover::before {
    opacity: 0.1;
}

.likert-option.selected {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.likert-option.selected::before {
    opacity: 0;
}

.likert-value {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.likert-text {
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.likert-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.likert-labels span {
    padding: 8px 16px;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: none;
    position: relative;
}

.question-navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
}

/* Sleep Question Styles */
.sleep-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.sleep-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.sleep-option:hover {
    border-color: #10b981;
    background: #ecfdf5;
}

.sleep-option.selected {
    border-color: #10b981;
    background: #ecfdf5;
}

.sleep-percentage {
    background: #d1fae5;
    color: #065f46;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ================= MODERNIZED BRAIN SCORE RESULTS ================= */
.results-header {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.05), rgba(255, 255, 255, 0.8));
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.results-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23667eea" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23764ba2" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23667eea" opacity="0.15"/><circle cx="10" cy="60" r="0.5" fill="%23764ba2" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.results-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
    position: relative;
    z-index: 2;
    opacity: 0.9;
}

.brain-score {
    margin: 3rem 0;
    padding: 2.5rem;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.brain-score::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(102, 126, 234, 0.05), transparent);
    animation: scoreRotate 20s linear infinite;
    z-index: 1;
}

.brain-score-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.score-value-large {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    position: relative;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: scoreCountUp 2s ease-out;
}

@keyframes scoreCountUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.score-bar {
    width: 100%;
    height: 16px;
    border-radius: 12px;
    background: linear-gradient(90deg, #10b981 0%, #f59e0b 50%, #ef4444 100%);
    position: relative;
    margin: 2rem 0;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.score-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: barShine 3s infinite;
}

@keyframes barShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.score-indicator {
    position: absolute;
    top: -8px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #1e293b, #475569);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(30, 41, 59, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.8);
    animation: indicatorPulse 2s ease-in-out infinite;
}

@keyframes indicatorPulse {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(30, 41, 59, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.8);
    }
    50% { 
        box-shadow: 0 6px 16px rgba(30, 41, 59, 0.6), 0 0 0 6px rgba(255, 255, 255, 0.9);
    }
}

.score-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.brain-message-result {
    padding: 2.5rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    margin: 2rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.brain-message-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 24px 24px 0 0;
}

.brain-message-result:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

/* ================= MODERNIZED DETAILED RESULTS SECTION ================= */
.detailed-results {
    padding: 3rem 2rem;
    background: linear-gradient(145deg, #f8fafc, #ffffff);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.result-category {
    margin-bottom: 2.5rem;
    padding: 2.5rem;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.06);
    border: 1px solid rgba(102, 126, 234, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.result-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.result-category:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.12);
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.category-score {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.05), rgba(255, 255, 255, 0.8));
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    display: inline-block;
}

.category-description {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.category-details {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.02), rgba(255, 255, 255, 0.9));
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.08);
    margin-top: 1rem;
}

.category-details h4 {
    color: #475569;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.category-details p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* ================= MODERNIZED PERSONALITY TYPE SECTION ================= */
.personality-type {
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2.5rem;
    border-radius: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.3),
        0 8px 16px rgba(118, 75, 162, 0.2);
    animation: personalityGlow 4s ease-in-out infinite;
}

@keyframes personalityGlow {
    0%, 100% { 
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3), 0 8px 16px rgba(118, 75, 162, 0.2);
    }
    50% { 
        box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4), 0 12px 24px rgba(118, 75, 162, 0.3);
    }
}

.personality-type::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: personalityOrb 8s linear infinite;
    z-index: 1;
}

@keyframes personalityOrb {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.personality-type::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    z-index: 1;
}

.personality-content {
    position: relative;
    z-index: 2;
}

.personality-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.personality-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.personality-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.personality-description {
    font-size: 1.1rem;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* ================= MODERNIZED RECOMMENDATIONS SECTION ================= */
.recommendations-header {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.recommendations-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="sparkle" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.3"/><circle cx="5" cy="5" r="0.5" fill="white" opacity="0.2"/><circle cx="15" cy="5" r="0.5" fill="white" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23sparkle)"/></svg>');
    animation: sparkleMove 15s linear infinite;
    z-index: 1;
}

@keyframes sparkleMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-20px) translateY(-20px); }
}

.recommendations-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.recommendations-header p {
    position: relative;
    z-index: 2;
    opacity: 0.9;
    font-size: 1.1rem;
}

.recommendations-content {
    padding: 3rem 2rem;
    background: linear-gradient(145deg, #f8fafc, #ffffff);
}

.recommendation-item {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.recommendation-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 0 3px 3px 0;
}

.recommendation-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.12);
}

.recommendation-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.recommendation-title {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.recommendation-description {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.recommendation-tips {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.02), rgba(255, 255, 255, 0.8));
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.08);
    backdrop-filter: blur(10px);
}

.recommendation-tips h4 {
    color: #475569;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.recommendation-tips ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: none;
}

.recommendation-tips li {
    margin-bottom: 0.8rem;
    color: #64748b;
    line-height: 1.6;
    position: relative;
    padding-left: 1.5rem;
}

.recommendation-tips li::before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.03), rgba(255, 255, 255, 0.9));
    flex-wrap: wrap;
    border-radius: 0 0 24px 24px;
    position: relative;
}

.result-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
}

/* Buttons */
.btn--large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    min-width: 200px;
}

/* ================= MOBILE RESPONSIVE IMPROVEMENTS ================= */
@media (max-width: 768px) {
    /* Quiz Results Mobile */
    .quiz-results-container {
        padding: 2rem 1.5rem;
        border-radius: 24px;
        margin: 1rem;
    }
    
    .quiz-results-title {
        font-size: 2rem;
    }
    
    .quiz-score-summary {
        flex-direction: column;
        gap: 2rem;
    }
    
    .score-circle {
        width: 140px;
        height: 140px;
    }
    
    .score-value {
        font-size: 3rem;
    }
    
    .score-details {
        width: 100%;
    }
    
    .performance-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quiz-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .quiz-action-btn {
        width: 100%;
        padding: 1rem 2rem;
    }
    
    /* Brain Assessment Mobile */
    .brain-assessment-section {
        padding: 1rem;
    }
    
    .brain-assessment-intro, 
    .symptoms-check, 
    .assessment-questions, 
    .assessment-results,
    .recommendations {
        margin: 0 0 1rem 0;
        border-radius: 20px;
    }
    
    .assessment-header {
        padding: 2rem 1.5rem;
        border-radius: 20px 20px 0 0;
    }
    
    .assessment-header h2 {
        font-size: 1.6rem;
    }
    
    .question-container {
        padding: 2rem 1.5rem;
    }
    
    .question-title {
        font-size: 1.2rem;
    }
    
    .question-emoji img {
        width: 60px;
        height: 60px;
    }
    
    .likert-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }
    
    .likert-option {
        padding: 1rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .likert-value {
        font-size: 1.2rem;
    }
    
    .score-value-large {
        font-size: 4rem;
    }
    
    .personality-type {
        padding: 2.5rem 2rem;
        border-radius: 24px;
    }
    
    .personality-title {
        font-size: 1.6rem;
    }
    
    .personality-subtitle {
        font-size: 1.1rem;
    }
    
    .personality-badge {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .question-navigation {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .question-navigation .btn {
        width: 100%;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .result-category {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .recommendations-content {
        padding: 2rem 1.5rem;
    }
    
    .recommendation-item {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .result-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .quiz-results-container {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        border-radius: 20px;
    }
    
    .quiz-results-title {
        font-size: 1.8rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-value {
        font-size: 2.5rem;
    }
    
    .score-value-large {
        font-size: 3.5rem;
    }
    
    .likert-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
    
    .likert-option {
        padding: 0.8rem 0.3rem;
        font-size: 0.7rem;
    }
    
    .likert-value {
        font-size: 1rem;
    }
    
    .symptom-item {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
    
    .question-title {
        font-size: 1.1rem;
    }
    
    .question-container {
        padding: 1.5rem 1rem;
    }
    
    .assessment-header {
        padding: 1.5rem 1rem;
    }
    
    .personality-type {
        padding: 2rem 1.5rem;
    }
    
    .personality-title {
        font-size: 1.4rem;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .recommendation-item {
        padding: 1.25rem;
    }
    
    .recommendation-title {
        font-size: 1.2rem;
    }
    
    .brain-score {
        padding: 2rem 1.5rem;
    }
    
    .assessment-header p {
        font-size: 1.1rem;
    }
}
    
    .question-emoji img {
        width: 60px;
        height: 60px;
    }
    
    .question-title {
        font-size: 1.2rem;
    }
    
    .likert-option {
        padding: 1rem 0.4rem;
    }
    
    .question-container {
        padding: 2rem 1.5rem;
    }
    
    .mandatory-quiz-question-progress {
        padding: 1.2rem 1.5rem;
    }
}

/* ================= ADDITIONAL MANDATORY QUIZ STYLES ================= */

/* Sleep Options Styling */
.sleep-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.sleep-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
}

.sleep-option:hover {
    background: #e3f2fd;
    border-color: #4a90e2;
    transform: translateY(-2px);
}

.sleep-option.selected {
    background: linear-gradient(135deg, #4a90e2, #50c878);
    color: white;
    border-color: #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.sleep-percentage {
    font-size: 14px;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
}

.sleep-option.selected .sleep-percentage {
    background: rgba(255, 255, 255, 0.3);
}

/* Progress Bar for Mandatory Quiz - Using specific classes to avoid conflicts */
.mandatory-quiz-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.5); /* Increase opacity to be more visible */
    border-radius: 50px;
    overflow: hidden;
    margin: 16px 0;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: block !important;
    visibility: visible !important;
}

.mandatory-quiz-progress-fill,
#mandatory-assessment-progress {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 400% 400%;
    border-radius: 50px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    min-width: 2px; /* Ensure some visibility even at 0% */
    box-shadow: 
        0 2px 8px rgba(255, 107, 107, 0.3),
        0 0 16px rgba(255, 107, 107, 0.2);
    animation: gradientShift 3s ease-in-out infinite;
    position: relative;
    display: block !important;
    visibility: visible !important;
}

.mandatory-quiz-progress-fill::after,
#mandatory-assessment-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50px;
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes progressShine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* Navigation Buttons for Mandatory Quiz */
#mandatory-prev-question,
#mandatory-next-question {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 8px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#mandatory-prev-question::before,
#mandatory-next-question::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#mandatory-prev-question:hover::before,
#mandatory-next-question:hover::before {
    left: 100%;
}

#mandatory-prev-question:hover,
#mandatory-next-question:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

#mandatory-prev-question:active,
#mandatory-next-question:active {
    transform: translateY(-1px) scale(1.02);
}

/* Add emoji to buttons */
#mandatory-prev-question::after {
    content: ' ⬅️';
}

#mandatory-next-question::after {
    content: ' ➡️';
}

#complete-daily-assessment {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#complete-daily-assessment::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

#complete-daily-assessment:hover::before {
    left: 100%;
}

#complete-daily-assessment:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

#complete-daily-assessment::after {
    content: ' 🎉';
}

#complete-daily-assessment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 200, 120, 0.4);
}

/* Score Display for Mandatory Quiz */
#mandatory-brain-score-value {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #4a90e2, #50c878);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#mandatory-score-indicator {
    position: absolute;
    top: -8px;
    width: 16px;
    height: 16px;
    background: #4a90e2;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.5);
    transition: left 0.5s ease;
}

#mandatory-brain-result-message {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    margin: 20px 0;
    line-height: 1.5;
}

#mandatory-detailed-results {
    text-align: left;
    margin-top: 20px;
}

#mandatory-detailed-results .result-category {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

#mandatory-detailed-results .category-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

#mandatory-detailed-results .category-score {
    font-size: 16px;
    color: #4a90e2;
    font-weight: 600;
    margin-bottom: 8px;
}

#mandatory-detailed-results .category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Quiz Blocking State - Disable main app while mandatory quiz is active */
body.quiz-blocking .tab-button:not([data-tab="quiz"]) {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

body.quiz-blocking .tab-content:not(#quiz) {
    pointer-events: none;
    opacity: 0.5;
}

/* Smooth transition when quiz completes */
.quiz-completion-transition {
    transition: all 0.5s ease-in-out;
}

/* Success indicator for completed assessment */
.assessment-completed-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #50c878, #32cd32);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.assessment-completed-indicator.show {
    opacity: 1;
    transform: translateX(0);
}

.assessment-completed-indicator.hide {
    opacity: 0;
    transform: translateX(100px);
}

/* ================= QUIZ HISTORY & NAVIGATION STYLES ================= */

/* Quiz Navigation */
.quiz-navigation {
    margin-bottom: 20px;
}

.quiz-nav-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.quiz-nav-btn {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quiz-nav-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: #6366f1;
}

.quiz-nav-btn:not(.active) {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
}

.quiz-nav-btn:not(.active):hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-2px);
}

/* Daily Quiz Status */
.daily-quiz-status {
    margin-bottom: 20px;
}

.daily-status-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.daily-status-info h3 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 20px;
    font-weight: 600;
}

.daily-status-info p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.daily-status-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Quiz History Styles */
.quiz-history {
    margin-bottom: 20px;
}

.history-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.filter-group select {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 14px;
}

/* History Summary Stats */
.history-summary {
    margin-bottom: 24px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* History List */
.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.history-loading .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    background: white;
    transition: all 0.2s ease;
}

.history-item:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.history-item.today {
    border-left: 4px solid #10b981;
    background: linear-gradient(90deg, #f0fdf4, #ffffff);
}

.history-item.retakeable {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(90deg, #fffbeb, #ffffff);
}

.history-date {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-date-primary {
    font-weight: 600;
    color: #1e293b;
    font-size: 16px;
}

.history-date-secondary {
    font-size: 12px;
    color: #64748b;
}

.history-score {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.score-circle.excellent {
    background: linear-gradient(135deg, #10b981, #059669);
}

.score-circle.good {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.score-circle.average {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.score-circle.poor {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.history-actions {
    display: flex;
    gap: 8px;
}

.history-retake-btn {
    padding: 6px 12px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-retake-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.history-retake-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.history-details-btn {
    padding: 6px 12px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-details-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

/* Empty State */
.history-empty {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.history-empty img {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.history-empty h4 {
    margin-bottom: 8px;
    color: #374151;
}

.history-empty p {
    margin-bottom: 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-nav-buttons {
        flex-direction: column;
    }
    
    .quiz-nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .daily-status-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .daily-status-actions {
        justify-content: center;
    }
    
    .history-filters {
        flex-direction: column;
        gap: 12px;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .history-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .history-score {
        flex-direction: column;
        gap: 8px;
    }
}