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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    width: 100%;
    max-width: 600px;
}

/* 认证面板 */
.auth-panel,
.user-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 48px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    text-align: center;
    margin-bottom: 24px;
    color: #000000;
}

h1 {
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000000;
}

.subtitle {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
}

/* 表单 */
.login-form {
    margin-top: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    outline: none;
    background: #fafafa;
}

.form-group input:focus {
    border-color: #000000;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

/* 按钮 */
.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #d0d0d0;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
    border-color: #b0b0b0;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid #d0d0d0;
    color: #666;
}

.btn-outline:hover:not(:disabled) {
    border-color: #000000;
    color: #000000;
    background: #fafafa;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    font-size: 14px;
}

.form-footer a {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 用户面板 */
.user-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 32px;
}

.user-avatar {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    border-radius: 50%;
    color: #ffffff;
}

.user-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #000000;
}

.user-info p {
    font-size: 14px;
    color: #666;
}

.user-section {
    margin-bottom: 32px;
}

.user-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.token-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
}

.token-display code {
    flex: 1;
    font-size: 13px;
    color: #333;
    word-break: break-all;
    font-family: 'Monaco', 'Courier New', monospace;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.btn-icon:hover {
    background: #f0f0f0;
    border-color: #b0b0b0;
    color: #000000;
}

.hint {
    font-size: 13px;
    color: #999;
}

.code-example {
    margin-bottom: 16px;
}

.code-example pre {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
}

.code-example code {
    font-size: 13px;
    color: #333;
    font-family: 'Monaco', 'Courier New', monospace;
    line-height: 1.6;
}

.user-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.user-actions .btn {
    width: auto;
    flex: 1;
    min-width: 120px;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #000000;
}

.modal-body {
    padding: 32px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 24px 32px;
    border-top: 1px solid #e0e0e0;
}

.modal-footer .btn {
    flex: 1;
}

/* 响应式 */
@media (max-width: 640px) {
    .auth-panel,
    .user-panel {
        padding: 32px 24px;
    }

    h1 {
        font-size: 28px;
    }

    .user-actions {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

/* 错误提示 */
.error-message {
    padding: 12px 16px;
    background: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    color: #cc0000;
    font-size: 14px;
    margin-bottom: 16px;
}

.success-message {
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 14px;
    margin-bottom: 16px;
}
