/* CSS变量定义 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --reset-color: #e74c3c;
    --card-color: #2ecc71;
    --poweroff-color: #7f8c8d;
    --light-off: #bdc3c7;
    --light-on: #ffffff;
    --panel-bg: #f8f9fa;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-opacity: 0.8;
    --invite-bg: rgba(255, 215, 0, 0.2);
    --invite-border: #ffd700;
    --notification-color: #ffffff;
    --header-bg-color: transparent;
    --header-text-color: white;
    --header-font-size: 1.8rem;
    --header-font-size-mobile: 1.4rem; /* 新增：手机端标题字体大小变量 */
    --logo-size: 120px;
    --window-text-color: var(--text-dark);
    --window-comment-color: var(--text-light);
    --calibration-text-color: var(--text-light);
    --countdown-text-color: var(--primary-color);
    --hangar-time-text-color: var(--text-dark);
    --status-text-color: var(--text-dark);
    --qrcode-caption-color: white;
    --donation-btn-bg: #ff6b6b;
    --window-title-color: var(--primary-color);
    --mobile-toggle-bg: rgba(52, 152, 219, 0.9); /* 新增：移动端切换按钮颜色 */
    --mobile-toggle-hover: rgba(41, 128, 185, 0.9); /* 新增：移动端切换按钮悬停颜色 */
    --invite-toggle-bg: rgba(255, 215, 0, 0.9); /* 新增：推荐码切换按钮金色背景 */
    --invite-toggle-hover: rgba(255, 193, 7, 0.9); /* 新增：推荐码切换按钮金色悬停颜色 */
}

/* 新增：通知动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #1a2a6c;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    transition: background-image 0.5s ease;
    background-size: cover;
    background-position: center;
    padding-bottom: 60px;
    position: relative;
}

body.video-bg {
    background-image: none !important;
}

#video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    width: 100%;
}

.logo {
    width: 100%;
    max-width: var(--logo-size);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.qrcode-container {
    position: fixed;
    bottom: 140px;
    left: 20px;
    text-align: center;
    z-index: 100;
}

.qrcode {
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.qrcode:hover {
    transform: scale(1.05);
}

.qrcode img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.qrcode-caption {
    font-size: 0.8rem;
    color: var(--qrcode-caption-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 100px;
}

.invite-code-container {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--invite-bg);
    border: 1px solid var(--invite-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.invite-code-container:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.invite-code-container a {
    color: #ffd700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.invite-code-container i {
    font-size: 0.8rem;
}

header {
    background: var(--header-bg-color);
    color: var(--header-text-color);
    padding: 1.2rem;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    font-size: var(--header-font-size);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.timer-display {
    background-color: rgba(255, 255, 255, var(--bg-opacity));
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.notification-bar {
    width: 100%;
    overflow: hidden;
    margin-bottom: 15px;
    height: 30px;
    position: relative;
    color: var(--notification-color);
}

.notification-scroll {
    position: absolute;
    white-space: nowrap;
    animation: scroll 20s linear infinite;
}

.notification-scroll a {
    color: inherit;
    text-decoration: none;
}

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

.phase-indicator {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.phase-reset {
    background-color: rgba(231, 76, 60, 0.15);
    color: var(--reset-color);
    border: 2px solid var(--reset-color);
}

.phase-card {
    background-color: rgba(46, 204, 113, 0.15);
    color: var(--card-color);
    border: 2px solid var(--card-color);
}

.phase-poweroff {
    background-color: rgba(127, 140, 141, 0.15);
    color: var(--poweroff-color);
    border: 2px solid var(--poweroff-color);
}

.phase-disabled {
    background-color: rgba(127, 140, 141, 0.15);
    color: var(--poweroff-color);
    border: 2px solid var(--poweroff-color);
}

.countdown {
    font-size: 3.5rem;
    font-weight: bold;
    margin: 20px 0;
    color: var(--countdown-text-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
}

.lights-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.light {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.light.active {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.light.red {
    background-color: var(--reset-color);
}

.light.green {
    background-color: var(--card-color);
}

.light.gray {
    background-color: var(--poweroff-color);
}

.hangar-open-time {
    font-size: 1.1rem;
    margin: 15px 0;
    color: var(--hangar-time-text-color);
}

.card-windows {
    background-color: rgba(255, 255, 255, var(--bg-opacity));
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-top: 20px;
}

.card-windows h2 {
    margin-bottom: 10px;
    color: var(--window-title-color);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--window-comment-color);
}

.window-status {
    font-size: 0.85rem;
    color: var(--window-comment-color);
    margin-bottom: 15px;
    text-align: center;
}

.window-list {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.window-list li {
    background-color: transparent;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--window-text-color);
}

.window-list li i {
    color: var(--card-color);
    font-size: 1.1rem;
}

.info-text {
    text-align: center;
    margin-top: 15px;
    color: var(--text-light);
    font-style: italic;
}

.status-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
    color: var(--status-text-color);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.status-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.status-red {
    background-color: var(--reset-color);
}

.status-green {
    background-color: var(--card-color);
}

.status-gray {
    background-color: var(--poweroff-color);
}

.calibration-time {
    position: absolute;
    bottom: 15px;
    left: 15px;
    font-size: 0.8rem;
    color: var(--calibration-text-color);
    padding: 4px 8px;
    border-radius: 4px;
}

.user-login-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(52, 152, 219, 0.9);
    z-index: 1000;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-login-btn:hover {
    width: 160px;
    border-radius: 25px;
    background: rgba(52, 152, 219, 1);
}

.user-login-btn span {
    display: none;
    white-space: nowrap;
    padding-left: 5px;
}

.user-login-btn:hover span {
    display: inline;
}

.feedback-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(46, 204, 113, 0.9);
    z-index: 1000;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.feedback-btn:hover {
    width: 160px;
    border-radius: 25px;
    background: rgba(46, 204, 113, 1);
}

.feedback-btn span {
    display: none;
    white-space: nowrap;
    padding-left: 5px;
}

.feedback-btn:hover span {
    display: inline;
}

.admin-panel-btn {
    position: fixed;
    bottom: 140px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(155, 89, 182, 0.9);
    z-index: 1000;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.admin-panel-btn:hover {
    width: 160px;
    border-radius: 25px;
    background: rgba(155, 89, 182, 1);
}

.admin-panel-btn span {
    display: none;
    white-space: nowrap;
    padding-left: 5px;
}

.admin-panel-btn:hover span {
    display: inline;
}

.user-center-btn {
    position: fixed;
    bottom: 200px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(241, 196, 15, 0.9);
    z-index: 1000;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-center-btn:hover {
    width: 160px;
    border-radius: 25px;
    background: rgba(241, 196, 15, 1);
}

.user-center-btn span {
    display: none;
    white-space: nowrap;
    padding-left: 5px;
}

.user-center-btn:hover span {
    display: inline;
}

.donation-btn {
    position: fixed;
    bottom: 260px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--donation-btn-bg);
    z-index: 1000;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.donation-btn:hover {
    width: 160px;
    border-radius: 25px;
    background: var(--donation-btn-bg);
}

.donation-btn span {
    display: none;
    white-space: nowrap;
    padding-left: 5px;
}

.donation-btn:hover span {
    display: inline;
}

.db-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 0.8rem;
    color: var(--text-light);
    background: transparent; /* 改为透明 */
    padding: 5px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-buttons button {
    width: auto;
    flex: 1;
}

.cancel-btn {
    background: linear-gradient(to right, #95a5a6, #7f8c8d);
}

.admin-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1002;
    resize: both;
    min-width: 400px;
    min-height: 300px;
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    cursor: move;
}

.admin-panel-header h2 {
    margin: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    padding: 0;
    border: none;
}

.close-admin-panel {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 5px;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.admin-tab {
    padding: 10px 15px;
    cursor: pointer;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s;
}

.admin-tab.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.admin-tab-content {
    display: none;
}

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

.admin-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
}

.admin-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.admin-card h3 {
    margin-bottom: 12px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-dark);
    font-size: 0.9rem;
}

input[type="datetime-local"], select, input[type="password"], input[type="text"], input[type="range"], textarea, input[type="url"], input[type="file"], input[type="color"], input[type="email"] {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

input[type="datetime-local"]:focus, select:focus, input[type="password"]:focus, input[type="text"]:focus, input[type="range"]:focus, textarea:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="email"]:focus {
    border-color: var(--secondary-color);
    outline: none;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

button {
    background: linear-gradient(to right, var(--secondary-color), #2980b9);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.bg-preview {
    width: 100%;
    height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    margin-top: 8px;
    border: 2px dashed #ddd;
}

.video-preview {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    margin-top: 8px;
    border: 2px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.logo-preview {
    width: 100%;
    max-width: 300px;
    height: auto;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.qrcode-preview {
    width: 80px;
    height: 80px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.qrcode-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.feedback-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.feedback-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.feedback-item:last-child {
    border-bottom: none;
}

.feedback-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.feedback-content {
    margin-top: 5px;
    word-break: break-word;
}

.feedback-contact {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 3px;
}

.feedback-username {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-top: 3px;
}

.delete-feedback {
    background: var(--reset-color);
    padding: 4px 8px;
    font-size: 0.75rem;
    margin-top: 5px;
    width: auto;
}

.api-test-result {
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
    background-color: #f8f9fa;
    font-size: 0.85rem;
}

.success {
    color: var(--card-color);
    border: 1px solid var(--card-color);
}

.error {
    color: var(--reset-color);
    border: 1px solid var(--reset-color);
}

.upload-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.upload-group input[type="file"] {
    flex: 1;
}

.upload-group button {
    width: auto;
    flex: 0 0 80px;
    padding: 8px;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    background: transparent;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.footer-notice {
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.footer-notice-scroll {
    display: inline-block;
    padding-left: 100%;
    animation: footer-scroll 15s linear infinite;
}

.footer-notice-scroll a {
    color: inherit;
    text-decoration: none;
}

@keyframes footer-scroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-info span {
    white-space: nowrap;
}

.footer-info a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.3s;
}

.footer-info a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.donation-modal-content {
    max-width: 500px;
}

.donation-qrcodes {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.donation-qrcode {
    text-align: center;
}

.donation-qrcode img {
    width: 150px;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
}

.donation-records {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-top: 15px;
}

.donation-record {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.donation-record:last-child {
    border-bottom: none;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-preview {
    width: 25px;
    height: 25px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.admin-panel-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.qrcode-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1003;
    justify-content: center;
    align-items: center;
}

.qrcode-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    max-width: 300px;
}

.qrcode-modal img {
    max-width: 250px;
    max-height: 250px;
    margin-bottom: 15px;
}

.qrcode-modal-caption {
    font-size: 1rem;
    color: var(--text-dark);
    margin-top: 10px;
}

.contact-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

.contact-inputs input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.link-input-group {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.link-input-group input {
    flex: 1;
}

/* 访问统计样式 */
.visits-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.visit-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}

.visit-item:last-child {
    border-bottom: none;
}

.visit-ip {
    font-weight: bold;
    color: var(--primary-color);
}

.visit-date {
    color: var(--text-light);
    font-size: 0.75rem;
}

.visit-count {
    margin-top: 10px;
    font-weight: bold;
    color: var(--secondary-color);
}

.user-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.user-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-item:last-child {
    border-bottom: none;
}

.user-info {
    flex: 1;
}

.user-actions {
    display: flex;
    gap: 5px;
}

.user-action-btn {
    width: auto;
    padding: 5px 10px;
    font-size: 0.75rem;
}

.user-center {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1002;
}

.user-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.user-center-content {
    margin-bottom: 20px;
}

.login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.login-tab {
    padding: 10px 20px;
    cursor: pointer;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s;
}

.login-tab.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.login-tab-content {
    display: none;
}

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

.user-role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 5px;
}

.user-admin {
    background-color: #e74c3c;
    color: white;
}

.user-normal {
    background-color: #3498db;
    color: white;
}

.user-pending {
    background-color: #f39c12;
    color: white;
}

.user-super-admin {
    background-color: #9b59b6;
    color: white;
}

.user-frozen {
    background-color: #7f8c8d;
    color: white;
}

.user-center-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.user-center-tab {
    padding: 10px 15px;
    cursor: pointer;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s;
}

.user-center-tab.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.user-center-tab-content {
    display: none;
}

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

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.user-edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1004;
    justify-content: center;
    align-items: center;
}

.user-edit-modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

/* 找回密码弹窗样式 */
.password-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1005;
    justify-content: center;
    align-items: center;
}

.password-modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.password-display {
    background-color: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    font-size: 1.2rem;
    font-weight: bold;
    word-break: break-all;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-password-btn {
    background: var(--card-color);
    width: auto;
    padding: 8px 15px;
    margin-left: 10px;
}

/* 令牌管理样式 */
.token-stats {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.token-stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.token-stat-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.token-stat-label {
    font-weight: bold;
    color: var(--text-dark);
}

.token-stat-value {
    color: var(--secondary-color);
    font-weight: bold;
}

.token-user-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.token-user-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.token-user-item:last-child {
    border-bottom: none;
}

.token-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.token-actions button {
    flex: 1;
}

.clean-expired-btn {
    background: linear-gradient(to right, #f39c12, #e67e22);
}

.clean-all-btn {
    background: linear-gradient(to right, #e74c3c, #c0392b);
}

/* 新增：移动端收起功能样式 */
@media (max-width: 768px) {
    /* 移动端可收起容器 */
    .mobile-collapsible {
        transition: all 0.3s ease;
    }
    
    .mobile-collapsible.collapsed {
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }
    
    .invite-code-container.mobile-collapsible.collapsed {
        transform: translateX(100%);
    }
    
    /* 移动端切换按钮 */
    .mobile-toggle-btn {
        position: fixed;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
        opacity: 0;
        pointer-events: none;
    }
    
    .mobile-toggle-btn.visible {
        opacity: 1;
        pointer-events: all;
    }
    
    .mobile-toggle-btn.active {
        transform: scale(1.1);
    }
    
    .mobile-toggle-btn:hover {
        transform: scale(1.05);
    }
    
    /* 二维码切换按钮位置和颜色 */
    .qrcode-toggle {
        bottom: 140px;
        left: 15px;
        background: var(--mobile-toggle-bg);
    }
    
    .qrcode-toggle.active, .qrcode-toggle:hover {
        background: var(--mobile-toggle-hover);
    }
    
    /* 推荐码切换按钮位置和颜色 - 调整为金色并下移 */
    .invite-toggle {
        top: 65px; /* 从15px调整为65px，下移50px避免压在推荐码上 */
        right: 15px;
        background: var(--invite-toggle-bg); /* 金色背景 */
    }
    
    .invite-toggle.active, .invite-toggle:hover {
        background: var(--invite-toggle-hover); /* 金色悬停颜色 */
    }
    
    /* 调整收起后二维码和推荐码的位置，避免与切换按钮重叠 */
    .qrcode-container.mobile-collapsible {
        left: 10px;
        bottom: 190px;
        z-index: 1000;
    }
    
    .invite-code-container.mobile-collapsible {
        top: 15px;
        right: 15px;
        z-index: 1000;
    }
    
    /* 确保切换按钮在收起状态下可见 */
    .qrcode-container.collapsed + .qrcode-toggle,
    .invite-code-container.collapsed + .invite-toggle {
        opacity: 1;
        pointer-events: all;
    }

    .container {
        padding: 10px;
    }
    
    header {
        padding: 1rem;
        font-size: var(--header-font-size-mobile);
    }
    
    .timer-display, .card-windows, .admin-panel, .user-center {
        padding: 15px;
    }
    
    .countdown {
        font-size: 2.5rem;
    }
    
    .phase-indicator {
        font-size: 1.2rem;
        flex-direction: column;
        text-align: center;
    }
    
    .light {
        width: 40px;
        height: 40px;
    }
    
    .window-list {
        grid-template-columns: 1fr;
    }
    
    .admin-panel-grid {
        grid-template-columns: 1fr;
    }
    
    .user-login-btn:hover, .feedback-btn:hover, .admin-panel-btn:hover, .user-center-btn:hover, .donation-btn:hover {
        width: 50px;
        border-radius: 50%;
    }
    
    .user-login-btn:hover span, .feedback-btn:hover span, .admin-panel-btn:hover span, .user-center-btn:hover span, .donation-btn:hover span {
        display: none;
    }
    
    .qrcode-container {
        bottom: 260px;
        left: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-notice {
        max-width: 90%;
        order: 2;
    }
    
    .footer-info {
        order: 1;
        gap: 10px;
    }
    
    .invite-code-container {
        top: 15px;
        right: 15px;
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .donation-qrcodes {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .admin-card {
        padding: 12px;
    }
    
    .admin-panel, .user-center {
        width: 95%;
        min-width: unset;
        padding: 15px;
    }
    
    .user-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .password-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .copy-password-btn {
        margin-left: 0;
        width: 100%;
    }
    
    .token-actions {
        flex-direction: column;
    }
    
    /* 新增：校准时间在手机端上移，避免与状态指示灯文字重叠 */
    .calibration-time {
        bottom: 25px; /* 从15px调整为25px，上移10px */
    }
    
    /* 修改：Logo容器在手机端的响应式调整 - 修复Logo大小不实时变化的问题 */
    .logo {
        max-width: min(100%, var(--logo-size)); /* 修改：使用min函数确保Logo大小不超过容器且响应设置 */
    }
    
    .logo-preview {
        max-width: 200px;
    }
}
