/* Base Styles */
:root {
    /* New neumorphic color palette */
    --primary-color: #6b7cff;
    --secondary-color: #ff7eb6;
    --background: #f0f2f9;
    --text-color: #2d3748;
    --shadow-light: #ffffff;
    --shadow-dark: rgba(163, 177, 198, 0.6);
    --border-color: rgba(206, 212, 218, 0.5);
    --component-bg: #e6e9f0;
    --hover-color: #5a69ed;
    --neumo-radius: 15px;
}

/* Dark theme variables */
[data-theme="dark"] {
    --primary-color: #6b7cff;
    --secondary-color: #ff7eb6;
    --background: #1a1f36;
    --text-color: #e2e8f0;
    --shadow-light: rgba(255, 255, 255, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.4);
    --border-color: rgba(50, 60, 80, 0.5);
    --component-bg: #252b43;
    --hover-color: #7b8aff;
}

/* Typography */
body {
    background: var(--background);
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Modal open state - 禁止页面滚动 */
body.modal-open {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* Neumorphic Design Components */
.neumo-card {
    background: var(--component-bg);
    border-radius: var(--neumo-radius);
    box-shadow: 5px 5px 15px var(--shadow-dark), 
                -5px -5px 15px var(--shadow-light);
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
    margin-bottom: 2rem;
}

.neumo-card-header {
    background: var(--component-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    position: relative;
}

.neumo-card-body {
    padding: 20px;
}

.neumo-button {
    background: var(--component-bg);
    border-radius: 10px;
    padding: 12px 20px;
    border: none;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    box-shadow: 5px 5px 10px var(--shadow-dark), 
                -5px -5px 10px var(--shadow-light);
    transition: all 0.3s ease;
}

.neumo-button:hover {
    box-shadow: 7px 7px 15px var(--shadow-dark), 
                -7px -7px 15px var(--shadow-light);
    transform: translateY(-2px);
}

.neumo-button:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), 
                inset -3px -3px 6px var(--shadow-light);
    transform: translateY(0);
}

.neumo-button.primary {
    background: var(--primary-color);
    color: white;
}

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

.neumo-button.primary:active {
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2);
}

/* Switch Group */
.switch-group {
    display: flex;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.switch-btn {
    flex: 1;
    padding: 12px 16px;
    background: var(--component-bg);
    border: none;
    border-radius: 10px;
    color: var(--text-color);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 10px var(--shadow-dark),
                -5px -5px 10px var(--shadow-light);
}

.switch-btn:hover {
    transform: translateY(-2px);
}

.switch-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2),
                inset -1px -1px 3px rgba(255, 255, 255, 0.2);
}

.switch-btn[disabled] {
    background: #f8d7da;
    color: #721c24;
    opacity: 0.8;
    cursor: not-allowed;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1),
                inset -2px -2px 5px rgba(255, 255, 255, 0.5);
}

.switch-btn[disabled]:hover {
    transform: none;
}

/* Form Controls */
.form-control {
    background: var(--component-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: inset 2px 2px 5px var(--shadow-dark), 
                inset -2px -2px 5px var(--shadow-light);
}

.form-control:focus {
    outline: none;
    box-shadow: inset 3px 3px 6px var(--shadow-dark), 
                inset -3px -3px 6px var(--shadow-light);
    border-color: var(--primary-color);
}

.form-label {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

/* Enhanced Time Display - Fixed flicker issue */
.time-display {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 0.9rem;
    background: var(--component-bg);
    color: var(--text-color);
    padding: 0.8rem 1.2rem;
    border-radius: var(--neumo-radius);
    z-index: 100;
    text-align: center;
    line-height: 1.4;
    box-shadow: 5px 5px 10px var(--shadow-dark), 
                -5px -5px 10px var(--shadow-light);
    font-family: 'Inter', system-ui, sans-serif;
}

.time-display:hover {
    box-shadow: 7px 7px 15px var(--shadow-dark), 
                -7px -7px 15px var(--shadow-light);
}

.time-display .date {
    font-size: 0.8em;
    opacity: 0.8;
    display: block;
}

.time-display .time {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--primary-color);
}

/* Navigation Bar */
.neumo-navbar {
    background: var(--component-bg);
    padding: 0.8rem 0;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px var(--shadow-dark);
}

.neumo-navbar .navbar-brand {
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.neumo-navbar .navbar-brand img {
    border-radius: 10px;
    box-shadow: 3px 3px 6px var(--shadow-dark), 
                -3px -3px 6px var(--shadow-light);
    margin-right: 10px;
}

/* Main container consistent spacing */
main.container {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

/* Navigation links */
.neumo-navbar .nav-links {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.neumo-navbar .nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.neumo-navbar .nav-link:hover {
    background: var(--component-bg);
    box-shadow: 3px 3px 8px var(--shadow-dark),
                -3px -3px 8px var(--shadow-light);
    color: var(--primary-color);
}

.neumo-navbar .nav-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.2),
                inset -2px -2px 5px rgba(255, 255, 255, 0.1);
}

/* Help Button */
.help-button.neumorphic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--component-bg);
    box-shadow: 5px 5px 10px var(--shadow-dark), 
                -5px -5px 10px var(--shadow-light);
    color: var(--primary-color);
    border: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.help-button.neumorphic:hover {
    box-shadow: 7px 7px 15px var(--shadow-dark), 
                -7px -7px 15px var(--shadow-light);
    transform: translateY(-2px);
}

.help-button.neumorphic:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), 
                inset -3px -3px 6px var(--shadow-light);
    transform: translateY(0);
}

/* Radio buttons */
.neumo-radio-group {
    display: flex;
    gap: 10px;
}

.neumo-radio-group .radio-option {
    position: relative;
}

.neumo-radio-group input[type="radio"] {
    opacity: 0;
    position: absolute;
}

.neumo-radio-group label {
    display: block;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--component-bg);
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 5px 5px 10px var(--shadow-dark), 
                -5px -5px 10px var(--shadow-light);
    transition: all 0.3s ease;
}

.neumo-radio-group input[type="radio"]:checked + label {
    background: var(--primary-color);
    color: white;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2), 
                inset -1px -1px 3px rgba(255, 255, 255, 0.2);
}

/* Range slider */
.neumo-range {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: var(--component-bg);
    border-radius: 4px;
    box-shadow: inset 2px 2px 4px var(--shadow-dark), 
                inset -2px -2px 4px var(--shadow-light);
    outline: none;
}

.neumo-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 2px 2px 4px var(--shadow-dark);
    cursor: pointer;
}

.neumo-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 2px 2px 4px var(--shadow-dark);
    cursor: pointer;
    border: none;
}

/* Neumorphic file input styling */
.neumo-file-input {
    position: relative;
    width: 100%;
}

.neumo-file-button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: var(--component-bg);
    border-radius: var(--neumo-radius);
    box-shadow: 5px 5px 15px var(--shadow-dark), 
                -5px -5px 15px var(--shadow-light);
    color: var(--text-color);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.neumo-file-button:hover {
    box-shadow: 7px 7px 15px var(--shadow-dark), 
                -7px -7px 15px var(--shadow-light);
}

.neumo-file-button:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), 
                inset -3px -3px 6px var(--shadow-light);
}

.selected-files {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--component-bg);
    border-radius: var(--neumo-radius);
    color: var(--text-color);
    box-shadow: inset 2px 2px 5px var(--shadow-dark), 
                inset -2px -2px 5px var(--shadow-light);
    min-height: 20px;
    word-break: break-all;
}

/* File upload area */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--neumo-radius);
    padding: 20px;
    text-align: center;
    background: var(--component-bg);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
}

/* Theme toggle switch */
.theme-switch {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    width: 60px;
    height: 30px;
    background: var(--component-bg);
    border-radius: 15px;
    box-shadow: inset 2px 2px 5px var(--shadow-dark),
                inset -2px -2px 5px var(--shadow-light);
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-switch-toggle {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 2px 2px 5px var(--shadow-dark);
    left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    z-index: 2;
}

[data-theme="dark"] .theme-switch-toggle {
    left: 32px;
}

.theme-icon-light {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.theme-icon-dark {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

[data-theme="light"] .theme-icon-light {
    opacity: 1;
}

[data-theme="dark"] .theme-icon-dark {
    opacity: 1;
}

/* Elegant wave loader animation - completely redesigned */
.neumo-loader {
    display: inline-block;
    width: 80px;
    height: 60px;
    position: relative;
    background: transparent;
}

.neumo-loader .wave {
    position: absolute;
    bottom: 0;
    width: 8px;
    height: 16px;
    border-radius: 4px;
    background: var(--primary-color);
    box-shadow: 2px 2px 4px var(--shadow-dark);
    animation: wave-animation 1.2s infinite ease-in-out;
}

.neumo-loader .wave:nth-child(1) {
    left: 0;
    animation-delay: 0s;
}

.neumo-loader .wave:nth-child(2) {
    left: 18px;
    animation-delay: 0.2s;
}

.neumo-loader .wave:nth-child(3) {
    left: 36px;
    animation-delay: 0.4s;
}

.neumo-loader .wave:nth-child(4) {
    left: 54px;
    animation-delay: 0.6s;
}

.neumo-loader .wave:nth-child(5) {
    left: 72px;
    animation-delay: 0.8s;
}

@keyframes wave-animation {
    0%, 100% {
        height: 16px;
        transform: translateY(0);
    }
    50% {
        height: 36px;
        transform: translateY(-15px);
    }
}

/* Loading message styling */
.loading-message {
    font-size: 14px;
    color: var(--text-color);
    text-align: center;
    margin-top: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.9;
    text-shadow: 1px 1px 1px var(--shadow-dark);
}
/* ===================== */
/* 主题适配的表格样式 */
/* ===================== */
.theme-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--component-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: var(--neumo-radius);
  box-shadow: 5px 5px 15px var(--shadow-dark), -5px -5px 15px var(--shadow-light);
  overflow: hidden;
  transition: all 0.3s ease;
}

.theme-table th,
.theme-table td {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  vertical-align: middle;
}

.theme-table-header th {
  background-color: rgba(0,0,0,0.05);
  color: var(--text-color);
}

[data-theme="dark"] .theme-table-header th {
  background-color: rgba(255,255,255,0.05);
  color: var(--text-color);
}

.theme-table tbody tr:hover {
  background-color: var(--hover-color);
  color: #fff;
}

.theme-table thead th:first-child {
  border-top-left-radius: var(--neumo-radius);
}

.theme-table thead th:last-child {
  border-top-right-radius: var(--neumo-radius);
}

.theme-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--neumo-radius);
}

.theme-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--neumo-radius);
}

/* 响应式兼容Bootstrap */
.table-responsive > .theme-table {
  margin-bottom: 0;
}

/* FAQ主题适配 */
.accordion {
    background: var(--component-bg);
    border-radius: var(--neumo-radius);
    box-shadow: 5px 5px 15px var(--shadow-dark), -5px -5px 15px var(--shadow-light);
    overflow: hidden;
}

.accordion-item {
    background: var(--component-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
}

.accordion-item:first-of-type {
    border-top-left-radius: var(--neumo-radius);
    border-top-right-radius: var(--neumo-radius);
}

.accordion-item:last-of-type {
    border-bottom-left-radius: var(--neumo-radius);
    border-bottom-right-radius: var(--neumo-radius);
}

.accordion-button {
    background: var(--component-bg);
    color: var(--text-color);
    font-weight: 500;
    box-shadow: none;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: var(--component-bg);
    color: var(--text-color);
    box-shadow: inset 2px 2px 6px var(--shadow-dark), inset -2px -2px 6px var(--shadow-light);
}

.accordion-button:hover {
    background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .accordion-button:hover {
    background: rgba(255,255,255,0.1);
}

.accordion-body {
    background: var(--component-bg);
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
}

/* 调整折叠面板边框阴影 */
.accordion-item {
    box-shadow: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
    transition: all 0.3s ease;
}

.accordion-item:hover {
    box-shadow: 5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light);
}

