/* ===== 通用样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-x: hidden;
}
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}
.header {
    text-align: center;
    padding: 20px 0 10px;
}
.site-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
}
body.dark-mode .site-title {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.container {
    width: 100%;
    max-width: 448px;
}

/* ===== 动画 ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== 卡片 ===== */
.card {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    padding: 2.5rem;
    text-align: center;
    color: white;
    animation: fadeUp 0.5s ease;
}

/* ===== 模态弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    z-index: 3000;
}
.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}
.modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    padding: 32px;
    max-width: 448px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}
body.dark-mode .modal {
    background: rgba(30, 30, 50, 0.95);
    color: white;
}
.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}
.modal-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
}
body.dark-mode .modal-title {
    color: white;
}
.modal-message {
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}
body.dark-mode .modal-message {
    color: rgba(255, 255, 255, 0.8);
}
.modal-btn {
    background: white;
    color: #7c3aed;
    border: none;
    padding: 12px 32px;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}
.modal-btn:hover {
    transform: translateY(-2px);
    background: #f5f3ff;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}
.modal-btn-gray {
    background: #6b7280;
    margin-left: 10px;
}
.error-modal {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ===== 二维码模态 ===== */
.qr-modal {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    padding: 2.5rem;
    text-align: center;
    color: white;
    max-width: 448px;
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.qr-modal .modal-title {
    color: white;
    margin: 0;
}
.qr-modal .modal-message {
    color: rgba(255, 255, 255, 0.85);
}

/* ===== 二维码按钮 ===== */
.qr-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    color: #7c3aed;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10;
    font-size: 18px;
    cursor: pointer;
    border: none;
}
.qr-btn:hover {
    background: #faf5ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

/* ===== 壁纸模式 ===== */
.wallpaper-mode {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: #000;
    cursor: pointer;
}
.wallpaper-mode.show {
    display: block;
    animation: fadeIn 0.3s ease;
}
.wallpaper-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wallpaper-footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 12px 24px;
}
.wallpaper-link {
    color: white;
    font-size: 0.875rem;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}
.wallpaper-link:hover {
    opacity: 1;
}

/* ===== 通用按钮样式 ===== */
.result-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    color: #7c3aed;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    flex: 1;
}
.result-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
    transition: left 0.5s ease;
}
.result-btn:hover::before {
    left: 100%;
}
.result-btn:hover {
    background: #faf5ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}
.result-btn svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}
.result-btn:hover svg {
    transform: translateY(-2px);
}
.result-btn-gray {
    background: rgba(255, 255, 255, 0.9);
    color: #6b7280;
}
.result-btn-gray:hover {
    background: #f9fafb;
}
