:root {
    --primary-color: #667eea;
    --primary-hover: #764ba2;
    --primary-rgb: 102, 126, 234;
    --danger-color: #dc2626;
    --danger-bg: #fee2e2;
    --danger-border: #fecaca;
    --success-color: #10b981;
    --success-bg: #d1fae5;
    --success-border: #a7f3d0;
    --text-gray: #888;
    --text-light: #999;
    --text-dark: #333;
    --text-body: #666;
    --border-light: #eef2ff;
    --border-input: #e2e8f0;
    --bg-white: #ffffff;
    --bg-gray: #f5f5f5;
}

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

button,
a,
input,
textarea {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.login-card {
    background: white;
    border-radius: 32px;
    padding: 48px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    text-align: center;
    flex-shrink: 0;
}

.login-card h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.login-card .sub {
    color: var(--text-body);
    margin-bottom: 40px;
    font-size: 14px;
}

.login-card input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 1.5px solid var(--border-input);
    border-radius: 24px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.login-card input:focus {
    border-color: var(--text-gray);
}

.login-card button {
    width: 100%;
    padding: 16px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.3s ease;
}

.login-card button:hover:not(:disabled) {
    background: #333333;
}

.login-card button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.register-note {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    color: var(--text-gray);
    font-size: 14px;
}

.register-note a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: normal;
}

.register-note a:hover {
    text-decoration: underline;
}

.register-note span a {
    color: var(--text-light);
    font-size: 14px;
    text-decoration: none;
    font-weight: normal;
}

.register-note span a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .login-card {
        padding: 32px 24px;
    }
}

/* ========== 底部样式 ========== */
.login-footer {
    margin-top: auto;
    width: 100%;
    max-width: 480px;
    text-align: center;
    flex-shrink: 0;
}

.footer-social-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.footer-social-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    cursor: pointer;
}

.footer-social-link:hover {
    color: var(--text-gray);
    text-decoration: underline;
}

.footer-copyright {
    padding-top: 12px;
}

.footer-copyright p {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* ========== 二维码弹窗样式 ========== */
.qrcode-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.qrcode-modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.qrcode-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

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

.qrcode-text {
    font-size: 16px;
    font-weight: normal;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-right: 20px;
}

.contact-text {
    font-size: 14px;
    color: var(--text-gray);
    margin: 10px 0 15px 0;
    text-align: center;
}

.qrcode-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-gray);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.qrcode-account span {
    font-size: 14px;
    color: var(--text-dark);
    font-family: monospace;
}

.copy-btn {
    background: var(--text-light);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: var(--text-gray);
}

.qrcode-image-area {
    min-height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qrcode-image-area img {
    width: 250px;
    height: 250px;
    object-fit: contain;
    display: block;
}

.qrcode-placeholder {
    width: 250px;
    height: 250px;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    white-space: pre-line;
}

/* ========== 提示信息框 ========== */
.message-box {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.message-box.error {
    background: var(--danger-bg);
    color: var(--danger-color);
    border: 1px solid var(--danger-border);
}

.message-box.success {
    background: var(--success-bg);
    color: var(--success-color);
    border: 1px solid var(--success-border);
}

/* ========== 续费弹窗样式（供登录页使用） ========== */
.words-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.words-confirm-box {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    min-width: 280px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.words-confirm-box p {
    margin-bottom: 16px;
    color: var(--text-dark);
    font-size: 15px;
}

.words-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.words-btn-confirm {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 8px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.words-btn-confirm:hover {
    background: #333333;
}

.words-btn-cancel {
    background: var(--bg-gray);
    color: var(--text-light);
    border: 1px solid var(--border-light);
    padding: 8px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.words-btn-cancel:hover {
    background: var(--border-light);
}

.words-prompt-input {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    resize: vertical;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--bg-white);
}

.words-prompt-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}
