* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #C41E3A;
    --accent-gold: #FFD700;
    --light-red: #FFE4E1;
    --dark-red: #8B0000;
    --text-dark: #2C1810;
    --text-light: #FFF8DC;
    --success: #228B22;
    --error: #DC143C;
    --nav-height: 56px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, var(--light-red) 0%, #FFF5EE 100%);
    color: var(--text-dark);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;
    position: relative;
    z-index: 100;
}

/* 顶部导航栏 */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(196, 30, 58, 0.25);
    position: relative;
    z-index: 1000;
}

.nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-back:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-3px);
    text-decoration: none;
    color: var(--text-light);
}

.nav-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.nav-text {
    font-size: 0.95rem;
}

.nav-title {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
}

.header {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(196, 30, 58, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 100;
}

.header h1 {
    color: var(--text-light);
    font-size: 2rem;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--accent-gold);
    font-size: 1rem;
}

/* 烟花和粒子特效背景 */
.fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 对联样式 */
.couplet-left,
.couplet-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    background: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
    border: 3px solid var(--accent-gold);
    border-radius: 8px;
    padding: 20px 15px;
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.couplet-left {
    left: 20px;
}

.couplet-right {
    right: 20px;
}

.couplet-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 2;
    letter-spacing: 8px;
}

.couplet-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(196, 30, 58, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.couplet-loading.active {
    display: flex;
}

.couplet-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-red);
    font-size: 1rem;
}

input[type="url"],
input[type="password"],
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #FFFEF9;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
    background: white;
}

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

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #FFA500 100%);
    color: var(--dark-red);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    color: #666;
    font-size: 0.95rem;
}

.footer strong {
    color: var(--primary-red);
}

.footer-thanks {
    margin-top: 10px;
    font-size: 0.9rem;
}

.back-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: linear-gradient(135deg, var(--dark-red) 0%, #6B0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
    text-decoration: none;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-gold);
}

.modal-header h2 {
    color: var(--primary-red);
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--error);
}

.api-info {
    background: var(--light-red);
    border-left: 4px solid var(--primary-red);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.api-info p {
    margin: 0;
}

.api-info code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.api-info a {
    color: var(--primary-red);
    text-decoration: underline;
}

.config-form {
    margin: 0;
}

.config-form .btn {
    margin-top: 10px;
}

.status-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
}

.status-message.success {
    background: #E8F5E9;
    color: var(--success);
    border: 1px solid #C8E6C9;
}

.status-message.error {
    background: #FFEBEE;
    color: var(--error);
    border: 1px solid #FFCDD2;
}
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    color: #666;
    font-size: 0.95rem;
}

.footer strong {
    color: var(--primary-red);
}

.footer-thanks {
    margin-top: 10px;
    font-size: 0.9rem;
}

.back-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

/* 主页面特定样式 */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.main-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(196, 30, 58, 0.3);
}

.main-header h1 {
    color: var(--text-light);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    position: relative;
    z-index: 100;
}

.module-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid var(--light-red);
    position: relative;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.2);
    border-color: var(--primary-red);
}

.module-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.module-card h2 {
    color: var(--primary-red);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.module-card p {
    color: #666;
    margin-bottom: 15px;
}

.module-arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.countdown-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--light-red);
    position: relative;
    z-index: 10;
}

.countdown-container h2 {
    color: var(--primary-red);
    margin-bottom: 20px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.1) 100%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 8px;
}

.countdown-label {
    color: var(--text-dark);
    font-weight: 600;
}

/* 右上角按钮 */
.top-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.config-button {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #FFA500 100%);
    border: none;
    color: var(--dark-red);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.config-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.achievement-button:hover {
    transform: scale(1.1) rotate(10deg);
}

.config-button:active {
    transform: scale(0.95);
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .couplet-left,
    .couplet-right {
        display: none;
    }
    
    .top-buttons {
        top: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .config-button {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .countdown {
        gap: 10px;
    }
    
    .countdown-number {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
}