@import url('fonts.css');

:root {
    --bg-deep: #030712;
    --bg-base: #0a0f1a;
    --bg-elevated: rgba(12, 20, 38, 0.85);
    --bg-glass: rgba(15, 25, 45, 0.6);
    --border-subtle: rgba(0, 212, 255, 0.12);
    --border-glow: rgba(0, 212, 255, 0.35);
    --accent-cyan: #00d4ff;
    --accent-blue: #0080ff;
    --accent-purple: #7c3aed;
    --accent-green: #10b981;
    --gradient-tech: linear-gradient(135deg, #00d4ff 0%, #0080ff 50%, #7c3aed 100%);
    --gradient-btn: linear-gradient(135deg, #00b4d8 0%, #0077ff 100%);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    user-select: none;
    -webkit-user-select: none;
}

input,
textarea,
select,
option,
[contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 128, 255, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(124, 58, 237, 0.08), transparent),
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ── */
.header {
    background: var(--header-bg, rgba(5, 10, 20, 0.85));
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-mark,
.site-icon {
    display: block;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logo p {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.25s;
}

.nav a:hover,
.nav a.active {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
}

.login-btn {
    background: transparent;
    border: 1px solid var(--border-glow);
    color: var(--accent-cyan);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    margin-left: 8px;
}

.login-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* ── Buttons ── */
.btn {
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gradient-btn);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 128, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 212, 255, 0.45);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--border-glow);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn i {
    margin-right: 6px;
}

/* ── Sections ── */
section {
    padding: 80px 40px;
    text-align: center;
}

.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

section h2,
section h3 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 48px;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

section h2::after,
section h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gradient-tech);
    margin: 16px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

/* ── Forms ── */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.25s;
    font-family: var(--font-body);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.form-group input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    min-width: 16px;
    height: 16px;
    padding: 0;
    cursor: pointer;
    accent-color: var(--accent-cyan, #00d4ff);
}

/* ── Modal ── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.modal-content .close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    line-height: 1;
}

.modal-content .close:hover {
    color: var(--accent-cyan);
}

.register-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.register-link a {
    color: var(--accent-cyan);
    text-decoration: none;
}

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

/* ── Progress ── */
.progress-container {
    margin-top: 24px;
}

.progress-bar {
    height: 4px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--gradient-tech);
    animation: loading 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

@keyframes loading {
    0% { width: 0%; margin-left: 0; }
    50% { width: 70%; margin-left: 15%; }
    100% { width: 0%; margin-left: 100%; }
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: var(--accent-cyan);
    font-size: 13px;
}

/* ── Footer ── */
.footer {
    background: rgba(5, 10, 20, 0.9);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    text-align: center;
    padding: 32px;
    font-size: 13px;
}

.footer p {
    margin-bottom: 4px;
}

.site-icp {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 12px;
}

.site-icp a {
    color: var(--text-muted);
    text-decoration: none;
}

.site-icp a:hover {
    color: var(--accent-cyan);
}

/* ── Captcha ── */
.captcha-group {
    margin-bottom: 20px;
    text-align: center;
}

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-row input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
}

.captcha-row input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.captcha-img-large {
    width: 130px;
    height: 46px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-glow);
    display: block;
    flex-shrink: 0;
    background: #0a0f1a;
}

.captcha-img-large:hover {
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.25);
}

.captcha-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-text-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
}

.captcha-text-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

/* ── Slider captcha ── */
.slider-captcha {
    --slider-width: 320px;
    width: 100%;
    max-width: var(--slider-width);
}

.slider-captcha-panel {
    position: relative;
    width: var(--slider-width);
    max-width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-glow);
    background: #0a0f1a;
    margin-bottom: 12px;
}

.slider-bg {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

.slider-piece {
    position: absolute;
    left: 0;
    top: 0;
    user-select: none;
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.slider-refresh {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: var(--accent-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
}

.slider-refresh:hover {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.25);
}

.slider-track {
    position: relative;
    width: var(--slider-width);
    max-width: 100%;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
    user-select: none;
}

.slider-track-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.06), transparent 60%);
}

.slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.25), rgba(0, 212, 255, 0.08));
    pointer-events: none;
}

.slider-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
}

.slider-thumb {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.slider-thumb.is-active {
    cursor: grabbing;
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.45);
}

.slider-track.is-locked .slider-thumb {
    cursor: default;
    background: linear-gradient(135deg, #10b981, #059669);
}

.slider-status {
    min-height: 18px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.slider-status.is-success {
    color: #34d399;
}

.slider-status.is-error {
    color: #f87171;
}

.slider-status.is-loading {
    color: var(--accent-cyan);
}

.slider-captcha.is-failed .slider-track {
    animation: slider-shake 0.45s ease;
}

.slider-captcha.is-verified .slider-hint {
    color: #34d399;
}

@keyframes slider-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.auth-section {
    padding: 80px 20px 60px;
    min-height: 70vh;
}

.auth-form {
    max-width: 480px;
    margin: 0 auto;
    text-align: left;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 28px;
}

/* Register welcome promo */
.welcome-promo {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 24px;
    border-radius: var(--radius-md, 12px);
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.06));
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.08);
}

.welcome-promo--auth {
    margin-bottom: 20px;
}

.welcome-promo--auth-compact {
    padding: 12px 14px;
    margin-bottom: 16px;
    align-items: center;
}

.welcome-promo-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.18);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.welcome-promo--auth-compact .welcome-promo-icon {
    width: 38px;
    height: 38px;
    font-size: 17px;
}

.welcome-promo-body {
    flex: 1;
    min-width: 0;
}

.welcome-promo-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fbbf24;
    margin-bottom: 4px;
}

.welcome-promo-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fef3c7;
    line-height: 1.4;
}

.welcome-promo--auth-compact .welcome-promo-title {
    font-size: 14px;
}

.welcome-promo-num {
    font-size: 1.35em;
    font-weight: 800;
    color: #fde047;
    text-shadow: 0 0 20px rgba(253, 224, 71, 0.35);
}

.welcome-promo-desc {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

.welcome-promo-cta {
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
}

.welcome-promo-link {
    flex-shrink: 0;
    align-self: center;
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
    text-decoration: none;
    white-space: nowrap;
}

.welcome-promo-link:hover {
    color: #fde047;
}

.auth-terms-group {
    margin-bottom: 8px;
}

.auth-terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

.auth-terms-check input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

.auth-terms-check a {
    color: var(--accent-cyan);
}

.form-error {
    color: #f87171;
    font-size: 13px;
    margin: 6px 0 12px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.auth-tab.active {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-oauth {
    margin-top: 4px;
    margin-bottom: 0;
}

.auth-oauth-divider--below {
    margin-top: 0;
    margin-bottom: 20px;
}

.auth-oauth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
    margin: 0 0 16px;
}

.auth-oauth-divider::before,
.auth-oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.auth-oauth-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.oauth-btn:hover {
    opacity: 0.92;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.oauth-btn__icon {
    font-size: 16px;
    line-height: 1;
}

.oauth-btn__label {
    line-height: 1.2;
    white-space: nowrap;
}

/* QQ 登录：参考 https://www.qwcms.com/login 简洁链接样式 */
.auth-qq-login-wrap {
    margin: 0 0 12px;
    text-align: center;
}

.auth-qq-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    color: #12b7f5;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.auth-qq-login .fa-qq {
    font-size: 18px;
}

.auth-qq-login:hover {
    color: #0099e5;
    text-decoration: underline;
    opacity: 0.95;
}

.oauth-btn--wechat {
    color: #fff;
    background: linear-gradient(135deg, #2dc96e, #07c160);
}

.auth-oauth-divider {
    margin-bottom: 10px;
}

.auth-oauth-divider--below {
    margin-bottom: 14px;
}

.captcha-modal {
    text-align: center;
    max-width: 380px;
}

.captcha-modal .slider-captcha {
    margin: 0 auto;
}

.send-code-hint.is-success {
    color: #34d399;
}

.send-code-hint.is-error {
    color: #f87171;
}

.btn-send-code:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.captcha-tip {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.captcha-modal input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    margin-bottom: 20px;
}

.empty-tip {
    color: var(--text-muted);
    padding: 40px;
    font-size: 14px;
}

.alert {
    max-width: 1200px;
    margin: 16px auto;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.content-area .alert {
    max-width: none;
    margin: 0 0 20px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #f87171;
}

@media (max-width: 768px) {
    .header {
        padding: 12px 20px;
        flex-direction: column;
        gap: 12px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    section {
        padding: 48px 20px;
    }

    section h3 {
        font-size: 24px;
    }

    .captcha-row {
        flex-wrap: wrap;
    }

    .captcha-row input {
        width: 100%;
    }
}
