/*
 * main.css - Main stylesheet for Vietnamese Hangman
 *
 * Contains global styles, layout, typography, forms, buttons, and utility classes
 * that are used throughout the application.
 */

/* ---------- CSS Reset & Base Styles ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%; /* 10px base font size for easy rem calculations */
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: #333;
  background-color: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

h1 {
  font-size: 3.6rem;
}

h2 {
  font-size: 3rem;
}

h3 {
  font-size: 2.4rem;
}

h4 {
  font-size: 2rem;
}

h5 {
  font-size: 1.8rem;
}

h6 {
  font-size: 1.6rem;
}

p {
  margin-bottom: 1.6rem;
}

a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

ul, ol {
  margin-bottom: 1.6rem;
  padding-left: 2.4rem;
}

code, pre {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f5f5f5;
  border-radius: 3px;
}

code {
  padding: 0.2rem 0.4rem;
  font-size: 90%;
}

pre {
  padding: 1.6rem;
  margin-bottom: 1.6rem;
  overflow: auto;
}

blockquote {
  border-left: 4px solid #ddd;
  padding-left: 1.6rem;
  margin-left: 0;
  margin-bottom: 1.6rem;
  font-style: italic;
}

/* ---------- Header & Navigation ---------- */
.main-header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1.6rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  height: 4rem;
  margin-right: 1rem;
}

.logo-text {
  font-size: 2.2rem;
  font-weight: 700;
  color: #333;
}

.main-nav {
  display: none;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin-left: 2.4rem;
}

.main-nav a {
  color: #555;
  font-weight: 500;
  text-decoration: none;
  padding: 0.8rem 0;
  position: relative;
}

.main-nav a:hover {
  color: #007bff;
}

.main-nav a.active {
  color: #007bff;
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #007bff;
}

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.8rem;
}

.mobile-menu-toggle span {
  display: block;
  width: 2.4rem;
  height: 2px;
  background-color: #333;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 6.4rem;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fff;
  z-index: 99;
  padding: 2.4rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.show {
  transform: translateX(0);
}

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

.mobile-menu nav li {
  margin-bottom: 1.6rem;
}

.mobile-menu nav a {
  display: block;
  font-size: 1.8rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.mobile-menu nav a.active {
  color: #007bff;
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
}

.username {
  font-weight: 500;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  min-width: 20rem;
  padding: 0.8rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 100;
}

.user-menu:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 1rem 1.6rem;
  color: #333;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
  background-color: #f5f5f5;
}

.dropdown-menu i {
  width: 2rem;
  margin-right: 1rem;
  text-align: center;
}

.settings-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.8rem;
  margin-left: 1rem;
  color: #555;
  font-size: 1.8rem;
  transition: color 0.3s ease;
}

.settings-button:hover {
  color: #007bff;
}

.header-right {
  display: flex;
  align-items: center;
}

/* ---------- Footer ---------- */
.main-footer {
  background-color: #333;
  color: #fff;
  padding: 4rem 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.4rem;
}

.footer-logo-image {
  height: 6rem;
  margin-bottom: 1rem;
}

.footer-logo-text {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3.2rem;
}

.footer-links-section {
  flex: 1;
  min-width: 20rem;
}

.footer-links-section h4 {
  font-size: 1.8rem;
  margin-bottom: 1.6rem;
  color: #fff;
}

.footer-links-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links-section li {
  margin-bottom: 0.8rem;
}

.footer-links-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links-section a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-social h4 {
  font-size: 1.8rem;
  margin-bottom: 1.6rem;
  color: #fff;
}

.social-icons {
  display: flex;
  gap: 1.6rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background-color: #444;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.social-icon:hover {
  background-color: #007bff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2.4rem;
  margin-top: 2.4rem;
  border-top: 1px solid #444;
}

.copyright {
  font-size: 1.4rem;
  color: #ccc;
}

.language-switcher select {
  background-color: #444;
  color: #fff;
  border: none;
  padding: 0.8rem 1.6rem;
  border-radius: 4px;
  cursor: pointer;
}

/* ---------- Main Content ---------- */
.main-content {
  flex: 1;
  padding: 4rem 0;
}

/* ---------- Forms & Inputs ---------- */
.form-group {
  margin-bottom: 2rem;
}

label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.form-control {
  display: block;
  width: 100%;
  padding: 1rem 1.6rem;
  font-size: 1.6rem;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #007bff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control-file {
  display: block;
  width: 100%;
}

.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-icon {
  display: flex;
  align-items: center;
  padding: 1rem 1.6rem;
  font-size: 1.6rem;
  color: #555;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 4px 0 0 4px;
}

.input-group .form-control {
  flex: 1;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.form-hint {
  margin-top: 0.8rem;
  font-size: 1.4rem;
  color: #666;
}

.checkbox {
  display: flex;
  align-items: center;
}

.checkbox input {
  margin-right: 1rem;
}

.checkbox label {
  margin-bottom: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 1rem 2rem;
  font-size: 1.6rem;
  line-height: 1.5;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

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

.btn-primary {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  color: #fff;
  background-color: #0069d9;
  border-color: #0062cc;
}

.btn-primary:active {
  color: #fff;
  background-color: #0062cc;
  border-color: #005cbf;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  color: #fff;
  background-color: #5a6268;
  border-color: #545b62;
}

.btn-secondary:active {
  color: #fff;
  background-color: #545b62;
  border-color: #4e555b;
}

.btn-danger {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-danger:hover {
  color: #fff;
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-danger:active {
  color: #fff;
  background-color: #bd2130;
  border-color: #b21f2d;
}

.btn-outline {
  color: #007bff;
  background-color: transparent;
  border-color: #007bff;
}

.btn-outline:hover {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-outline:active {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 1.4rem;
  border-radius: 3px;
}

.btn-lg {
  padding: 1.2rem 2.4rem;
  font-size: 1.8rem;
  border-radius: 6px;
}

/* ---------- Alerts & Feedback ---------- */
.alert {
  position: relative;
  padding: 1.6rem;
  margin-bottom: 2rem;
  border: 1px solid transparent;
  border-radius: 4px;
}

.alert.success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert.error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert.warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.alert.info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

.feedback {
  display: none;
  padding: 1.2rem;
  margin-bottom: 1.6rem;
  border-radius: 4px;
  font-size: 1.4rem;
  font-weight: 500;
}

.feedback.success {
  color: #155724;
  background-color: #d4edda;
}

.feedback.error {
  color: #721c24;
  background-color: #f8d7da;
}

.feedback.warning {
  color: #856404;
  background-color: #fff3cd;
}

.feedback.animate {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* ---------- Modals ---------- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 50rem;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 2.4rem;
  border-bottom: 1px solid #eee;
}

.modal-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.modal-body {
  padding: 2.4rem;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1.6rem 2.4rem;
  border-top: 1px solid #eee;
  gap: 1rem;
}

.close-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.8rem;
  color: #777;
  transition: color 0.3s ease;
}

.close-button:hover {
  color: #333;
}

/* ---------- Spinners & Loading Indicators ---------- */
.spinner {
  display: inline-block;
  width: 2.4rem;
  height: 2.4rem;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #007bff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner .spinner {
  width: 5rem;
  height: 5rem;
  margin-bottom: 2rem;
}

.loading-text {
  font-size: 1.8rem;
  font-weight: 500;
  color: #333;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ---------- Tables ---------- */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

th, td {
  padding: 1.2rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f8f9fa;
  font-weight: 500;
}

tr:hover {
  background-color: #f8f9fa;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.pagination-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-item {
  margin: 0 0.2rem;
}

.page-link {
  display: block;
  padding: 0.8rem 1.2rem;
  color: #007bff;
  background-color: #fff;
  border: 1px solid #dee2e6;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.page-item.active .page-link {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.page-item.disabled .page-link {
  color: #6c757d;
  pointer-events: none;
  background-color: #fff;
  border-color: #dee2e6;
}

.page-link:hover {
  color: #0056b3;
  background-color: #e9ecef;
  border-color: #dee2e6;
  text-decoration: none;
}

/* ---------- Cards ---------- */
.card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2.4rem;
  overflow: hidden;
}

.card-header {
  padding: 1.6rem 2.4rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.card-header h2, .card-header h3 {
  margin-bottom: 0;
}

.card-body {
  padding: 2.4rem;
}

.card-footer {
  padding: 1.6rem 2.4rem;
  background-color: #f8f9fa;
  border-top: 1px solid #eee;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 10rem;
}

.badge-primary {
  color: #fff;
  background-color: #007bff;
}

.badge-secondary {
  color: #fff;
  background-color: #6c757d;
}

.badge-success {
  color: #fff;
  background-color: #28a745;
}

.badge-danger {
  color: #fff;
  background-color: #dc3545;
}

.badge-warning {
  color: #212529;
  background-color: #ffc107;
}

.badge-info {
  color: #fff;
  background-color: #17a2b8;
}

.badge-easy {
  color: #fff;
  background-color: #28a745;
}

.badge-medium {
  color: #212529;
  background-color: #ffc107;
}

.badge-hard {
  color: #fff;
  background-color: #dc3545;
}

/* ---------- Notifications ---------- */
#notifications-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1050;
  max-width: 40rem;
}

.notification {
  display: flex;
  align-items: flex-start;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  padding: 1.6rem;
  margin-bottom: 1.6rem;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification.success .notification-icon {
  color: #28a745;
}

.notification.error .notification-icon {
  color: #dc3545;
}

.notification.warning .notification-icon {
  color: #ffc107;
}

.notification.info .notification-icon {
  color: #17a2b8;
}

.notification-icon {
  font-size: 2.4rem;
  margin-right: 1.6rem;
}

.notification-message {
  flex: 1;
  padding-right: 1.6rem;
}

.notification-close {
  background: none;
  border: none;
  color: #777;
  cursor: pointer;
  font-size: 1.4rem;
  padding: 0.4rem;
  transition: color 0.3s ease;
}

.notification-close:hover {
  color: #333;
}

/* ---------- Settings Panel ---------- */
.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 30rem;
  height: 100%;
  background-color: #fff;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 900;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.settings-panel.show {
  transform: translateX(0);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 2.4rem;
  border-bottom: 1px solid #eee;
}

.settings-header h3 {
  margin-bottom: 0;
}

.settings-content {
  padding: 2.4rem;
}

.settings-section {
  margin-bottom: 3.2rem;
}

.settings-section h4 {
  margin-bottom: 1.6rem;
  font-size: 1.8rem;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.6rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 5rem;
  height: 2.6rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.8rem;
  width: 1.8rem;
  left: 0.4rem;
  bottom: 0.4rem;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #007bff;
}

input:focus + .slider {
  box-shadow: 0 0 1px #007bff;
}

input:checked + .slider:before {
  transform: translateX(2.4rem);
}

.slider.round {
  border-radius: 3.4rem;
}

.slider.round:before {
  border-radius: 50%;
}

/* ---------- Auth Modal Styles ---------- */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
}

.auth-tab {
  padding: 1.2rem 2.4rem;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.auth-tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.auth-page {
  display: none;
  padding: 2.4rem;
}

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

.auth-form h2 {
  margin-bottom: 2.4rem;
  text-align: center;
}

.password-strength {
  margin-top: 1rem;
}

#password-strength-meter, #reset-password-strength-meter {
  width: 100%;
  height: 0.8rem;
}

#password-strength-text, #reset-password-strength-text {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.2rem;
  text-align: right;
}

.strength-none {
  color: #777;
}

.strength-weak {
  color: #dc3545;
}

.strength-fair {
  color: #ffc107;
}

.strength-good {
  color: #28a745;
}

.strength-strong {
  color: #007bff;
}

/* ---------- Progress Bars ---------- */
.progress-bar {
  width: 100%;
  height: 1rem;
  background-color: #e9ecef;
  border-radius: 10rem;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.progress-value {
  height: 100%;
  background-color: #007bff;
  border-radius: 10rem;
  transition: width 0.6s ease;
}

.progress-text {
  font-size: 1.4rem;
  text-align: right;
}

.progress-label {
  margin-bottom: 0.4rem;
  font-weight: 500;
}

/* ---------- Empty States ---------- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.empty-state i {
  font-size: 5rem;
  margin-bottom: 2rem;
  color: #ddd;
}

.empty-state p {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.empty-state.small {
  padding: 2rem;
}

.empty-state.small i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state.small p {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

/* ---------- Toast Notifications ---------- */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background-color: #333;
  color: #fff;
  padding: 1.6rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 1050;
  display: flex;
  align-items: center;
  max-width: 40rem;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-notification.toast-appear {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-notification.toast-disappear {
  transform: translateX(-50%) translateY(100%);
  opacity: 0;
}

.toast-icon {
  font-size: 2.4rem;
  margin-right: 1.6rem;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.toast-message {
  font-size: 1.4rem;
}

.toast-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  padding: 0.4rem;
  margin-left: 1.6rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.toast-close:hover {
  opacity: 1;
}

.toast-notification[data-type="success"] {
  background-color: #28a745;
}

.toast-notification[data-type="error"] {
  background-color: #dc3545;
}

.toast-notification[data-type="warning"] {
  background-color: #ffc107;
  color: #333;
}

.toast-notification[data-type="info"] {
  background-color: #17a2b8;
}

/* ---------- Dialog ---------- */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dialog-overlay.show {
  opacity: 1;
  visibility: visible;
}

.dialog {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 40rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dialog.show {
  opacity: 1;
  transform: translateY(0);
}

.dialog-content {
  padding: 2.4rem;
}

.dialog-message {
  font-size: 1.8rem;
  margin-bottom: 2.4rem;
  text-align: center;
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* ---------- Utility Classes ---------- */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.text-muted {
  color: #6c757d;
}

.text-primary {
  color: #007bff;
}

.text-success {
  color: #28a745;
}

.text-danger {
  color: #dc3545;
}

.text-warning {
  color: #ffc107;
}

.text-info {
  color: #17a2b8;
}

.hidden {
  display: none !important;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.margin-bottom-sm {
  margin-bottom: 1rem;
}

.margin-bottom-md {
  margin-bottom: 2rem;
}

.margin-bottom-lg {
  margin-bottom: 3rem;
}

.margin-top-sm {
  margin-top: 1rem;
}

.margin-top-md {
  margin-top: 2rem;
}

.margin-top-lg {
  margin-top: 3rem;
}

/* ---------- Dark Mode ---------- */
.dark-mode {
  color: #f8f9fa;
  background-color: #1a1a2e;
}

.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5, .dark-mode h6 {
  color: #f8f9fa;
}

.dark-mode .main-header {
  background-color: #212134;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dark-mode .logo-text {
  color: #f8f9fa;
}

.dark-mode .main-nav a {
  color: #ccc;
}

.dark-mode .mobile-menu-toggle span {
  background-color: #f8f9fa;
}

.dark-mode .mobile-menu {
  background-color: #212134;
}

.dark-mode .mobile-menu nav a {
  color: #f8f9fa;
  border-bottom-color: #333;
}

.dark-mode .dropdown-menu {
  background-color: #212134;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .dropdown-menu a {
  color: #f8f9fa;
}

.dark-mode .dropdown-menu a:hover {
  background-color: #2a2a43;
}

.dark-mode .card {
  background-color: #212134;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dark-mode .card-header {
  background-color: #2a2a43;
  border-bottom-color: #333;
}

.dark-mode .card-footer {
  background-color: #2a2a43;
  border-top-color: #333;
}

.dark-mode .form-control {
  color: #f8f9fa;
  background-color: #2a2a43;
  border-color: #444;
}

.dark-mode .input-icon {
  color: #f8f9fa;
  background-color: #2a2a43;
  border-color: #444;
}

.dark-mode .btn-outline {
  color: #007bff;
  border-color: #007bff;
}

.dark-mode .btn-outline:hover {
  color: #fff;
  background-color: #007bff;
}

.dark-mode th {
  background-color: #2a2a43;
}

.dark-mode td {
  border-bottom-color: #333;
}

.dark-mode tr:hover {
  background-color: #2a2a43;
}

.dark-mode .page-link {
  color: #007bff;
  background-color: #212134;
  border-color: #444;
}

.dark-mode .page-link:hover {
  color: #0056b3;
  background-color: #2a2a43;
  border-color: #444;
}

.dark-mode .page-item.disabled .page-link {
  color: #6c757d;
  background-color: #212134;
  border-color: #444;
}

.dark-mode .settings-panel {
  background-color: #212134;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .settings-header {
  border-bottom-color: #333;
}

.dark-mode .auth-tabs {
  border-bottom-color: #333;
}

.dark-mode .modal-content {
  background-color: #212134;
}

.dark-mode .modal-header {
  border-bottom-color: #333;
}

.dark-mode .modal-footer {
  border-top-color: #333;
}

.dark-mode .notification {
  background-color: #212134;
}

.dark-mode .empty-state i {
  color: #444;
}

.dark-mode .empty-state {
  color: #ccc;
}

.dark-mode .dialog {
  background-color: #212134;
}

.dark-mode .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

/* ---------- Animation Controlling ---------- */
.no-animations * {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

/* ---------- Compatibility Warnings ---------- */
.compatibility-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.warning-content {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 2.4rem;
  max-width: 50rem;
}

.warning-content h3 {
  margin-bottom: 1.6rem;
  color: #dc3545;
}

.warning-content ul {
  margin-bottom: 2.4rem;
}

.warning-content p {
  margin-bottom: 2.4rem;
}

.dark-mode .warning-content {
  background-color: #212134;
}

/* ---------- Responsive Design ---------- */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
  
  .main-nav {
    display: block;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .footer-content {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .footer-logo {
    align-items: flex-start;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (max-width: 767.98px) {
  .header-right {
    gap: 1rem;
  }
  
  .logo-text {
    display: none;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.4rem;
  }
  
  h3 {
    font-size: 2rem;
  }
  
  .footer-content {
    gap: 2rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1.6rem;
  }
  
  .modal-content {
    max-width: 100%;
  }
}

@media (max-width: 575.98px) {
  .container {
    padding: 0 1.5rem;
  }
  
  h1 {
    font-size: 2.6rem;
  }
  
  h2 {
    font-size: 2.2rem;
  }
  
  h3 {
    font-size: 1.8rem;
  }
  
  .btn {
    padding: 0.8rem 1.6rem;
  }
  
  .btn-lg {
    padding: 1rem 2rem;
  }
  
  .modal-header, .modal-body, .modal-footer {
    padding: 1.6rem;
  }
  
  .card-header, .card-body, .card-footer {
    padding: 1.6rem;
  }
  
  .auth-tab {
    padding: 1rem 1.6rem;
  }
  
  .auth-page {
    padding: 1.6rem;
  }
}

/* Print styles */
@media print {
  body {
    background-color: #fff;
    color: #000;
  }
  
  .main-header, .main-footer, .settings-panel, .mobile-menu, .btn {
    display: none !important;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}