/* 神算无双 - 全局样式 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: rgba(30, 30, 48, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    z-index: 10;
}

.register-box {
    max-width: 450px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 2.5em;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 5px;
}

.logo p {
    color: #aaa;
    margin-top: 10px;
    font-size: 1.1em;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #aaa;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(42, 42, 64, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.form-control::placeholder {
    color: #666;
}

.captcha-row {
    display: flex;
    gap: 12px;
}

.captcha-input {
    flex: 1;
}

.captcha-image {
    width: 120px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.captcha-image:hover {
    border-color: #ffd700;
    transform: scale(1.02);
}

/* 按钮 */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    border: none;
    border-radius: 10px;
    color: #1a1a2e;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* 错误提示 */
.error {
    color: #ff4444;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

/* 闪信消息 */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 0.95em;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.5);
    color: #28a745;
}

.alert-error {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.5);
    color: #ff4444;
}

.alert-info {
    background: rgba(23, 162, 184, 0.2);
    border: 1px solid rgba(23, 162, 184, 0.5);
    color: #17a2b8;
}

/* 底部 */
.login-footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 0.9em;
}

.login-footer a {
    color: #ffd700;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 初始化提示 */
.init-notice {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    color: #ffd700;
}

/* 背景装饰 */
.background-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

.star:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.star:nth-child(2) { top: 30%; left: 80%; animation-delay: 1s; }
.star:nth-child(3) { top: 70%; left: 10%; animation-delay: 2s; }
.star:nth-child(4) { top: 50%; left: 50%; animation-delay: 0.5s; }
.star:nth-child(5) { top: 80%; left: 70%; animation-delay: 1.5s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* 响应式 */
@media (max-width: 480px) {
    .login-box {
        margin: 20px;
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 2em;
    }

    .captcha-row {
        flex-direction: column;
    }

    .captcha-image {
        width: 100%;
        height: 50px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffed4a;
}
