/* 基础重置和变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --red-50: #fef2f2;
    --red-400: #f87171;
    --red-700: #b91c1c;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --white: #ffffff;
}

/* 字体定义 - 使用系统字体栈，接近 Inter 字体 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    font-size: 16px;
    line-height: 1.5;
    color: var(--slate-900);
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 1.5rem;
}

/* 容器布局 */
.container {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
}

.header-section {
    margin-bottom: 2rem;
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.logo-icon {
    background-color: var(--emerald-600);
    padding: 0.75rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.logo-icon svg {
    height: 2.5rem;
    width: 3.0rem;
    color: var(--white);
}

.title {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--slate-900);
}

.subtitle {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--slate-500);
}

/* 表单容器 */
.form-container {
    margin-top: 2rem;
    padding: 0 1rem;
}

.form-card {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 2rem 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 1rem;
    border: 1px solid var(--emerald-100);
}

/* 消息提示 */
.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0 0.375rem 0.375rem 0;
    display: none;
}

.message.error {
    background-color: var(--red-50);
    border-left: 4px solid var(--red-400);
}

.message.success {
    background-color: var(--emerald-50);
    border-left: 4px solid var(--emerald-400);
}

.message-content {
    display: flex;
    align-items: flex-start;
}

.message-icon {
    height: 1.25rem;
    width: 1.25rem;
    flex-shrink: 0;
}

.message-icon.error {
    color: var(--red-400);
}

.message-icon.success {
    color: var(--emerald-400);
}

.message-text {
    margin-left: 0.75rem;
    font-size: 0.875rem;
}

.message-text.error {
    color: var(--red-700);
}

.message-text.success {
    color: var(--emerald-700);
}

/* 表单样式 */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: 0.25rem;
}

.form-input-wrapper {
    margin-top: 0.25rem;
    position: relative;
}

.form-input {
    appearance: none;
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input::placeholder {
    color: var(--slate-400);
}

.form-input:focus {
    outline: none;
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-button {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
    background-color: var(--emerald-600);
    cursor: pointer;
    transition: all 0.2s;
    transform: translateY(0);
}

.form-button:hover:not(:disabled) {
    background-color: var(--emerald-700);
    transform: translateY(-2px);
}

.form-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--emerald-500);
}

.form-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-icon {
    display: none;
    animation: spin 1s linear infinite;
    margin-right: 0.75rem;
    margin-left: -0.25rem;
    height: 1.25rem;
    width: 1.25rem;
    color: var(--white);
}

.loading-icon.show {
    display: block;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-icon circle {
    opacity: 0.25;
}

.loading-icon path {
    opacity: 0.75;
}

/* 版权信息 */
.copyright {
    margin-top: 1.5rem;
}

.copyright-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--slate-400);
}

/* 响应式设计 */
@media (min-width: 640px) {
    body {
        padding: 3rem 1.5rem;
    }

    .form-card {
        padding: 2rem 2.5rem;
        border-radius: 1rem;
    }

    .form-input {
        font-size: 0.875rem;
    }
}

@media (min-width: 1024px) {
    body {
        padding: 3rem 2rem;
    }
}