/* --- 全局设定 --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    color: #333;
    overflow-x: hidden;
}

/* --- 动态极光背景 --- */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(125deg, #2c3e50, #4ca1af, #2c3e50);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- 主卡片 --- */
.container {
    background: rgba(255, 255, 255, 0.9);
    padding: 45px;
    border-radius: 20px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset; 
    width: 100%;
    max-width: 520px;
    position: relative;
    backdrop-filter: blur(20px);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

/* --- 元素样式 --- */
.icon-wrapper {
    text-align: center;
    font-size: 56px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

h1 {
    text-align: center;
    color: #1a202c;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 800;
}

h2 {
    text-align: center;
    color: #718096;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 35px;
}

textarea, input[type="password"], input[type="text"] {
    width: 100%;
    padding: 16px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    background-color: #f7fafc;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

textarea:focus, input:focus {
    background-color: #fff;
    border-color: #4ca1af;
    box-shadow: 0 0 0 4px rgba(76, 161, 175, 0.15);
    outline: none;
}

textarea {
    min-height: 140px;
    resize: none;
    font-family: inherit;
}

button {
    width: 100%;
    background: linear-gradient(135deg, #4ca1af 0%, #2c3e50 100%);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.4);
    background: linear-gradient(135deg, #5abbc9 0%, #34495e 100%);
}

button:active { transform: translateY(1px); }
button:disabled { background: #cbd5e0; box-shadow: none; cursor: not-allowed; transform: none; }

/* --- 消息内容 --- */
pre {
    background-color: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.6;
    color: #2d3748;
    border-left: 4px solid #4ca1af;
}

.warning {
    color: #e53e3e;
    font-size: 14px;
    text-align: center;
    background: #fff5f5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

#message-status {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* --- 页脚 --- */
.footer {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    animation: fadeIn 1s ease 0.5s backwards;
}

.footer-content {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 10px 25px;
    border-radius: 50px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.footer p { margin: 2px 0; color: rgba(255, 255, 255, 0.95); font-size: 13px; font-weight: 500; }
.footer .sub-text { font-size: 11px; color: rgba(255, 255, 255, 0.6); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Toast Notification (优化版动画) --- */
#toast-container {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    width: max-content;
}

.toast {
    background: rgba(30, 30, 30, 0.9);
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    text-align: center;
    min-width: 200px;
    
    /* 初始状态 */
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* 弹性过渡 */
}

/* 进场动画类 */
.toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 退场动画类 */
.toast-hidden {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s ease-out;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .container { padding: 25px; }
    h1 { font-size: 24px; }
    .icon-wrapper { font-size: 48px; }
}