:root {
    --primary-color: #1db954;
    --primary-dark: #1aa34a;
    --text-dark: #333333;
    --text-light: #6c757d;
    --border-color: #e9ecef;
    --transition: all 0.3s ease;
}

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

html,
body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #f5f5f5;
}

/* Toast 通知 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 15px 30px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

/* 凭证信息弹窗 */
.info-modal {
    max-width: 600px;
    max-height: 80vh;
}

.info-modal .modal-body {
    padding: 0;
}

.info-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.info-content::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.info-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    color: #6c757d;
}

.info-loading p {
    margin-top: 15px;
}

.info-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

.credential-item {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.credential-item:hover {
    background: #e9ecef;
}

.credential-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.copy-btn:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

.credential-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credential-value {
    word-break: break-all;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.5;
    background: white;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--primary-color);
    background: #e9ecef;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.close-btn:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 25px;
}

/* 登录选项 */
.login-option {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 18px 22px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    transition: var(--transition);
}

.login-option:last-child {
    margin-bottom: 0;
}

.login-option i {
    font-size: 24px;
    width: 30px;
    text-align: center;
}

.login-option.qq-btn {
    background: #12B7F5;
}

.login-option.wx-btn {
    background: #07C160;
}

.login-option.mobile-btn {
    background: #2196F3;
}

.login-option:hover {
    transform: translateX(5px);
    opacity: 0.9;
}

/* 二维码弹窗 */
.qrcode-modal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
}

.qrcode-box {
    width: 250px;
    height: 250px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    overflow: hidden;
}

.qrcode-image {
    max-width: 90%;
    max-height: 90%;
    display: none;
}

.qrcode-placeholder {
    text-align: center;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qrcode-placeholder p {
    margin-top: 15px;
    font-size: 14px;
    color: #adb5bd;
}

.qrcode-status {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.qrcode-status.success {
    color: #28a745;
}

.qrcode-status.error {
    color: #dc3545;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* 主页面 */
.main-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 500px;
    width: 100%;
}

.main-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 40px 30px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-btn i {
    font-size: 36px;
    color: var(--primary-color);
}

.main-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.main-btn:active {
    transform: translateY(-2px);
}

/* 响应式 */
@media (max-width: 500px) {
    .button-grid {
        grid-template-columns: 1fr;
    }

    .main-btn {
        padding: 30px 20px;
    }
}