:root {
  --color-primary: #0c4ba2;
  --color-accent: #fdbe34;
  --color-info: #129aef;
  --color-bg: #f5f5f7;
  --color-text: #2b2b2f;
  --card-radius: 16px;
  --card-shadow: 0 6px 18px rgba(12, 75, 162, 0.08);
}

[data-theme='classic'] {
  --color-primary: #052c65;
  --color-accent: #adb5bd;
}

[data-theme='night'] {
  --color-primary: #d1e4ff;
  --color-accent: #ffd166;
  --color-bg: #1a1b1f;
  --color-text: #f8f9fa;
}

[data-theme='neutral'] {
  --color-primary: #2563eb;
  --color-accent: #86efac;
  --color-bg: #f8fafc;
}

[data-theme='legacy'] {
  --color-primary: #0d6efd;
  --color-accent: #ffc107;
}

body {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
}

.navbar,
.navbar-dark {
  background: var(--color-primary) !important;
}

.btn-primary,
.btn-primary:focus {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: none;
}

.btn-primary:hover {
  background-color: #083777;
  border-color: #083777;
}

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

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

.badge.sunshine {
  background: var(--color-accent);
  color: #2b1d00;
  font-weight: 600;
}

.sunshine-card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  background: #fff;
}

.sunshine-card .card-header {
  background: transparent;
  border-bottom: none;
  font-weight: 600;
  color: var(--color-primary);
}

.sunshine-card .card-footer {
  background: transparent;
  border-top: none;
}

.sunshine-highlight {
  background: linear-gradient(135deg, rgba(12, 75, 162, 0.08), rgba(253, 190, 52, 0.12));
  border-radius: var(--card-radius);
}

.sunshine-progress {
  height: 0.5rem;
  border-radius: 999px;
  background-color: rgba(12, 75, 162, 0.15);
}

.sunshine-progress .progress-bar {
  background-color: var(--color-primary);
}

.sunshine-section-title {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.table thead th {
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.sunshine-floating-button {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(12, 75, 162, 0.25);
  z-index: 1040;
}

@media (max-width: 768px) {
  .table-responsive > .table {
    font-size: 0.9rem;
  }

  .sunshine-card {
    border-radius: 12px;
  }

  .btn {
    min-height: 48px;
    font-size: 1rem;
  }
}

/* Accessibility Styles */
body.high-contrast {
    background-color: #000 !important;
    color: #ff0 !important;
}
body.high-contrast .card, 
body.high-contrast .status-card,
body.high-contrast .lookup-card,
body.high-contrast .info-card,
body.high-contrast .status-item,
body.high-contrast .modal-content,
body.high-contrast .hero,
body.high-contrast .btn {
    background-color: #000 !important;
    border: 2px solid #ff0 !important;
    color: #ff0 !important;
}
body.high-contrast a, 
body.high-contrast h1, 
body.high-contrast h2, 
body.high-contrast h3,
body.high-contrast .text-muted,
body.high-contrast small {
    color: #ff0 !important;
}

body.large-text {
    font-size: 1.25em !important;
}
body.large-text h1 { font-size: 2.5em !important; }
body.large-text h2 { font-size: 2em !important; }
body.large-text h3 { font-size: 1.5em !important; }

.accessibility-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}
.accessibility-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.accessibility-menu {
    display: none;
    position: absolute;
    bottom: 60px;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 10px;
    width: 200px;
    border: 1px solid #ddd;
}
.accessibility-menu.show {
    display: block;
}
.accessibility-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    color: #333;
}
.accessibility-option:last-child {
    border-bottom: none;
}
.accessibility-option:hover {
    background-color: #f8f9fa;
}
