/* ===== CSS 變數系統 ===== */
:root {
  /* 顏色系統 */
  --primary-dark: #1C3144;
  --primary-gold: #D4AF37;
  --secondary-dark: #2D3B4D;
  --accent-copper: #B87333;
  --neutral-light: #F5F5F5;
  --text-dark: #1A1A1A;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --white: #ffffff;
  --black: #000000;
  
  /* 玻璃態效果 */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-backdrop: blur(10px);
  
  /* 陰影系統 */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* 圓角系統 */
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-2xl: 1.5rem;
  --border-radius-full: 9999px;
  
  /* 間距系統 */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Z-index 層級 */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* 暗色主題變數 */
[data-theme="dark"] {
  --primary-dark: #60a5fa;
  --neutral-light: #1f2937;
  --text-dark: #f9fafb;
  --glass-bg: rgba(0, 0, 0, 0.3);
  --white: #1f2937;
  --black: #f9fafb;
}

/* ===== 全域重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  height: 100%;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== 無障礙設計 ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-dark);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: var(--border-radius-md);
  z-index: 2000;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
  color: white;
}

/* ===== 焦點樣式 ===== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, 
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-dark);
  outline: none;
}

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

/* ===== 導航欄增強（移除動態效果） ===== */
.enhanced-navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  backdrop-filter: var(--glass-backdrop);
  border: none;
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 0;
  z-index: var(--z-sticky);
}

.brand-icon {
  font-size: 1.5rem;
  color: var(--primary-gold);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: white !important;
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--primary-gold) !important;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  border-radius: var(--border-radius-md);
  position: relative;
  overflow: hidden;
  margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: white !important;
  background-color: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
}

.navbar-toggler {
  border: none;
  padding: 0.375rem 0.5rem;
  background: transparent;
}

.navbar-toggler:focus {
  box-shadow: none;
  background: var(--glass-bg);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== 下拉菜單增強（移除動態效果） ===== */
.modern-dropdown {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
  background-color: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  margin-top: 0.5rem;
  min-width: 220px;
}

/* 確保下拉選單容器正常顯示 */
.navbar .nav-item {
  position: relative;
}

.navbar .dropdown-menu {
  position: absolute;
  z-index: 1000;
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.5rem;
  min-width: 150px;
  margin-top: 0.25rem;
}

/* 語言切換器下拉選單 */
.navbar .dropdown-menu.dropdown-menu-end {
  right: 0;
  left: auto;
}

/* 下拉選單項目樣式 */
.dropdown-item i {
  width: 1.25rem;
  text-align: center;
}

.logout-btn {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.25rem 1rem;
  color: #212529;
  border-radius: 0;
}

.logout-btn:hover {
  color: #1e2125;
  background-color: #e9ecef;
}

/* ===== 按鈕系統增強（移除動態效果） ===== */
.btn {
  border-radius: var(--border-radius-md);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0.025em;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
  border-color: var(--primary-dark);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--secondary-dark), var(--primary-dark));
  border-color: var(--secondary-dark);
  color: white;
  box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
  color: var(--primary-dark);
  border-color: var(--primary-dark);
  background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  box-shadow: var(--shadow-lg);
}

.btn-gold {
  background: linear-gradient(135deg, var(--primary-gold), var(--accent-copper));
  border-color: var(--primary-gold);
  color: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-gold:hover,
.btn-gold:focus {
  background: linear-gradient(135deg, var(--accent-copper), var(--primary-gold));
  border-color: var(--accent-copper);
  color: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #16a34a);
  border-color: var(--success);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  border-color: var(--danger);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  border-color: var(--warning);
  color: white;
}

.btn-info {
  background: linear-gradient(135deg, var(--info), #2563eb);
  border-color: var(--info);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* 按鈕組增強 */
.btn-group .btn {
  margin-right: 0.5rem;
}

.btn-group .btn:last-child {
  margin-right: 0;
}

@media (max-width: 576px) {
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group .btn {
    margin-right: 0;
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  .btn-group .btn:last-child {
    margin-bottom: 0;
  }
}

/* ===== 文字系統 ===== */
.text-primary {
  color: var(--primary-dark) !important;
}

.text-gold {
  color: var(--primary-gold) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-info {
  color: var(--info) !important;
}

/* 標題增強 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(26, 26, 26, 0.8);
}

@media (max-width: 768px) {
  .lead {
    font-size: 1.1rem;
  }
}

/* ===== 標題樣式增強（移除動態效果） ===== */
.section-heading {
  position: relative;
  font-weight: 600;
  letter-spacing: 0.025em;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  display: inline-block;
  color: var(--text-dark);
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-gold), var(--accent-copper));
  border-radius: var(--border-radius-sm);
}

.section-heading.centered {
  text-align: center;
  display: block;
}

.section-heading.centered::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-heading.large {
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .section-heading.large {
    font-size: 2rem;
  }
}

/* ===== 卡片系統增強（移除動態效果） ===== */
.card {
  border: none;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);
  background: white;
  overflow: hidden;
  position: relative;
}

.card-header {
  background: linear-gradient(135deg, var(--neutral-light), #ffffff);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: var(--neutral-light);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem 1.5rem;
}

.custom-card {
  border: none;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);
  background: white;
  overflow: hidden;
  position: relative;
}

.custom-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-gold), var(--accent-copper));
  opacity: 0;
}

.custom-card:hover::before {
  opacity: 1;
}

/* 特殊卡片樣式 */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
}

.feature-card {
  padding: 2rem;
  text-align: center;
}

.feature-card .feature-icon {
  font-size: 3rem;
  color: var(--primary-gold);
  margin-bottom: 1.5rem;
  display: block;
}

/* ===== 頁腳增強（移除動態效果） ===== */
.enhanced-footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  color: white;
  padding: 2rem 0 1.5rem;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.enhanced-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-gold), var(--accent-copper), var(--primary-gold));
}

.footer-heading {
  color: var(--primary-gold);
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
}

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 0.25rem 0;
  display: inline-block;
  position: relative;
}

.footer-link:hover {
  color: var(--primary-gold);
}

.footer-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-gold);
}

.footer-link:hover::before {
  width: 100%;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.social-link:hover {
  background: var(--primary-gold);
  color: var(--primary-dark);
  border-color: var(--primary-gold);
}

.footer-contact .contact-icon {
  color: var(--primary-gold);
  font-size: 1.125rem;
}

.contact-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.25rem;
}

.contact-value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 2rem 0 1rem;
}

.copyright {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer-meta {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-meta a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--primary-gold);
}

/* 回到頂部按鈕（移除動態效果） */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-gold), var(--accent-copper));
  color: var(--primary-dark);
  border: none;
  border-radius: var(--border-radius-full);
  font-size: 1.25rem;
  cursor: pointer;
  display: none;
  z-index: var(--z-fixed);
  box-shadow: var(--shadow-lg);
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--accent-copper), var(--primary-gold));
  box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1.125rem;
  }
}

/* ===== 通知系統增強（移除動態效果） ===== */
.alert {
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: currentColor;
}

.modern-alert {
  border-left: none;
}

.alert-icon {
  font-size: 1.25rem;
  opacity: 0.8;
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border-left: 4px solid var(--success);
}

.alert-success .alert-icon {
  color: var(--success);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-left: 4px solid var(--danger);
}

.alert-danger .alert-icon {
  color: var(--danger);
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border-left: 4px solid var(--warning);
}

.alert-warning .alert-icon {
  color: var(--warning);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  border-left: 4px solid var(--info);
}

.alert-info .alert-icon {
  color: var(--info);
}

.btn-close {
  opacity: 0.6;
}

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

/* ===== 表格增強（移除動態效果） ===== */
.table {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: white;
  margin-bottom: 0;
}

.table thead th {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  position: relative;
}

.table thead th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-gold);
}

.table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tbody tr:hover {
  background-color: rgba(28, 49, 68, 0.02);
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-top: none;
}

.table-responsive {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.table-scroll {
  position: relative;
}

.table-scroll::after {
  content: '→';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-gold);
  color: var(--primary-dark);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  opacity: 0.7;
}

/* ===== 表單增強（移除動態效果） ===== */
.form-control {
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
  background-color: white;
}

.form-control:focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
  background-color: white;
}

.form-control:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.input-group-text {
  background-color: var(--neutral-light);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-right: none;
  color: var(--text-dark);
}

.input-group .form-control {
  border-left: none;
}

.input-group:focus-within .input-group-text {
  border-color: var(--primary-gold);
  background-color: rgba(212, 175, 55, 0.1);
}

.form-check-input {
  border: 2px solid rgba(0, 0, 0, 0.2);
}

.form-check-input:checked {
  background-color: var(--primary-gold);
  border-color: var(--primary-gold);
}

.form-check-input:focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.form-select {
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
}

.form-select:focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

/* ===== 進度條增強（移除動畫） ===== */
.progress {
  height: 0.75rem;
  border-radius: var(--border-radius-md);
  background-color: var(--neutral-light);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-gold), var(--accent-copper));
  border-radius: var(--border-radius-md);
  position: relative;
  overflow: hidden;
}

/* ===== 徽章增強 ===== */
.badge {
  border-radius: var(--border-radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge.bg-success {
  background: linear-gradient(135deg, var(--success), #16a34a) !important;
  color: white;
}

.badge.bg-primary {
  background: linear-gradient(135deg, var(--info), #2563eb) !important;
  color: white;
}

.badge.bg-warning {
  background: linear-gradient(135deg, var(--warning), #d97706) !important;
  color: white;
}

.badge.bg-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626) !important;
  color: white;
}

/* ===== 載入動畫（簡化版） ===== */
.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-left-color: currentColor;
  border-radius: 50%;
}

.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.global-loader .spinner-border {
  width: 3rem;
  height: 3rem;
  color: var(--primary-dark);
}

/* ===== 工具提示和彈出框增強 ===== */
.tooltip {
  font-size: 0.875rem;
}

.tooltip-inner {
  background-color: var(--primary-dark);
  border-radius: var(--border-radius-md);
  padding: 0.5rem 0.75rem;
}

.popover {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
}

.popover-header {
  background-color: var(--primary-dark);
  color: white;
  border-bottom: none;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.popover-body {
  padding: 1rem;
}

/* ===== 響應式設計優化 ===== */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .navbar-nav {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-lg);
    margin-top: 1rem;
    padding: 1rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem !important;
    margin: 0.25rem 0;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group .btn {
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  .btn-group .btn:last-child {
    margin-bottom: 0;
  }
  
  .enhanced-footer {
    padding: 1.5rem 0 1rem;
  }
  
  .main-content {
    padding-bottom: 1rem;
  }
  
  .footer-heading {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .social-links {
    justify-content: center;
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-btn-container {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .scale-actions {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .alert {
    padding: 1rem;
  }
  
  .dropdown-menu {
    width: 100%;
    max-width: none;
  }
}

/* ===== 高對比度和無障礙支援 ===== */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--text-dark);
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
  .alert {
    border: 2px solid currentColor;
  }
}

/* ===== 打印樣式 ===== */
@media print {
  .navbar,
  .footer,
  .back-to-top,
  .btn,
  .alert {
    display: none !important;
  }
  
  .container {
    max-width: none !important;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ===== 主要內容區域 ===== */
.main-content {
  padding-bottom: 2rem;
  position: relative;
  flex-grow: 1;
}

/* ===== 工具類 ===== */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--primary-gold), var(--accent-copper)) border-box;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
}

.bg-gradient-gold {
  background: linear-gradient(135deg, var(--primary-gold), var(--accent-copper));
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-gold), var(--accent-copper));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
}

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

.shadow-strong {
  box-shadow: var(--shadow-xl);
}

.rounded-modern {
  border-radius: var(--border-radius-xl);
}

.overflow-hidden {
  overflow: hidden;
}

.position-relative {
  position: relative;
}

.d-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.cursor-pointer {
  cursor: pointer;
}

.user-select-none {
  user-select: none;
}

.pointer-events-none {
  pointer-events: none;
}