:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #1c2128;
    --border-color: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-primary: #58a6ff;
    --accent-secondary: #388bfd;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success: #3fb950;
    --error: #f85149;
    --warning: #d29922;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: 
        radial-gradient(at 40% 20%, rgba(102, 126, 234, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(118, 75, 162, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(102, 126, 234, 0.1) 0px, transparent 50%);
}

.container {
    width: 100%;
    max-width: 480px;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.panel.hidden {
    display: none;
}

.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.captcha-group .captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-group input {
    flex: 1;
}

.captcha-group img {
    height: 48px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.captcha-group img:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
}

.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #da3633;
}

.message {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--success);
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.message.error {
    background: rgba(248, 81, 73, 0.15);
    color: var(--error);
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.message:empty {
    display: none;
}

.security-info {
    margin-top: 24px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
}

.info-box {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
}

.info-box h3 {
    font-size: 14px;
    color: var(--accent-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.info-box p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 6px 0;
    padding-left: 16px;
    position: relative;
}

.info-box p::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 28px 0;
}

.actions {
    display: flex;
    gap: 12px;
}

.actions .btn {
    flex: 1;
}

.logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

@media (max-width: 520px) {
    .panel {
        padding: 24px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .actions {
        flex-direction: column;
    }
}

/* 输入框图标 */
.input-icon {
    position: relative;
}

.input-icon input {
    padding-left: 44px;
}

.input-icon::before {
    content: attr(data-icon);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 卡片悬浮效果 */
.panel {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
