/* style.css (高级简约版) */

/* --- 1. 变量与全局设定 --- */
:root {
    --accent-color: #E8A0BF; /* 柔和、低饱和度的雅粉色作为唯一亮点 */
    --text-color-primary: #333333; /* 主文本颜色，深灰 */
    --text-color-secondary: #777777; /* 次要文本颜色，中灰 */
    --container-bg: rgba(255, 255, 255, 0.75); /* 半透明白色，增加朦胧感 */
    --border-color: rgba(200, 200, 200, 0.3); /* 极细的边框，定义轮廓 */
    --shadow-color: rgba(100, 100, 100, 0.1); /* 更柔和、扩散的阴影 */
    --button-bg: #333; /* 按钮背景，与主文本色呼应，形成对比 */
    --error-color: #D9534F;
    
    /* 定义更平滑高级的动画曲线 */
    --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- 2. 基础与背景 --- */
body {
    font-family: 'ZCOOL XiaoWei', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    background-color: #f4f6f9; /* 使用一个非常浅的灰色作为底色，更有质感 */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(232, 160, 191, 0.1), transparent 30%),
        radial-gradient(circle at 80% 90%, rgba(150, 180, 220, 0.1), transparent 40%);
    overflow: hidden;
    position: relative; /* 为伪元素定位 */
}

/* 添加一个微妙的背景光晕效果，增加大气感 */
body::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background-image: radial-gradient(circle, var(--accent-color), transparent 60%);
    transform: translate(-50%, -50%);
    opacity: 0.08;
    filter: blur(100px);
    animation: pulse-glow 20s infinite alternate;
}

@keyframes pulse-glow {
    from { transform: translate(-50%, -50%) scale(0.8); }
    to { transform: translate(-50%, -50%) scale(1.2); }
}

/* --- 3. 核心容器 --- */
.container {
    text-align: center;
    background: var(--container-bg);
    padding: 70px 80px; /* 增加内边距，让内容呼吸 */
    border-radius: 28px;
    /* 核心：使用多层阴影营造真实、柔和的悬浮感 */
    box-shadow: 
        0 0 2px rgba(0,0,0,0.03),
        0 4px 8px rgba(0,0,0,0.03),
        0 10px 20px rgba(0,0,0,0.03),
        0 20px 40px var(--shadow-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    max-width: 400px;
    transition: all 0.5s var(--ease-out-quint);
    
    /* 入场动画 */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s var(--ease-out-quint) 0.3s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 4. 头像与文本 --- */
.avatar {
    width: 110px; /* 稍微缩小头像，使其更精致 */
    height: 110px;
    border-radius: 50%;
    /* 移除实体边框，改用阴影模拟光晕效果 */
    border: none;
    margin-bottom: 35px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8), 0 5px 20px rgba(232, 160, 191, 0.4);
    transition: transform 0.6s var(--ease-out-quint), box-shadow 0.6s var(--ease-out-quint);
}

.avatar:hover {
    /* 悬停效果改为轻微上浮和光晕放大，更优雅 */
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.6), 0 12px 35px rgba(232, 160, 191, 0.5);
}

h1 {
    color: var(--text-color-primary);
    font-size: 2.2em;
    margin-bottom: 15px;
    letter-spacing: 2px; /* 增加字间距，提升设计感 */
}

p {
    color: var(--text-color-secondary);
    font-size: 1.1em;
    line-height: 1.8;
}

/* --- 5. 按钮与交互 --- */
.button-group {
    margin-top: 40px;
}

button {
    color: white;
    background-color: var(--button-bg);
    border: none;
    padding: 18px 40px;
    border-radius: 14px; /* 使用适度圆角，而非全圆，更显稳重 */
    font-size: 1.1em;
    font-family: 'ZCOOL XiaoWei', sans-serif;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-quint);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

button:hover {
    background-color: #000; /* 悬停时变为纯黑，对比更强 */
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

button:disabled {
    background-color: #ccc !important;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- 6. 状态指示器 --- */
.spinner {
    margin: 25px auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* 优雅的单色加载环 */
    border: 4px solid rgba(0,0,0,0.1);
    border-top-color: var(--button-bg);
    animation: spin 1s var(--ease-out-quint) infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#message-box {
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 25px;
    font-size: 1em;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    border: 1px solid transparent;
}

#message-box.error {
    color: var(--error-color);
    background: rgba(217, 83, 79, 0.08);
    border-color: rgba(217, 83, 79, 0.2);
}