/* ========== 登录界面样式 ========== */
#login-screen {
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

#login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.login-title .title-jp {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
}

.login-title .title-cn {
    display: block;
    font-size: 1.5rem;
    margin-top: 5px;
}

.login-subtitle {
    color: #666;
    font-size: 1rem;
    margin-top: 10px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-tip {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    margin-top: 10px;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
}

.inspiring-quote {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    background: transparent;
    border: none;
    font-style: normal;
    padding: 0;
    margin: 0;
}

/* ========== 开始界面顶部栏 ========== */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
}

.player-info-top {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.player-name {
    font-weight: 600;
    color: white;
}

.player-level {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
}

/* ========== 激励语横幅 ========== */
.inspiring-banner {
    margin: 30px 0 50px;
    text-align: center;
    width: 100%;
}

.inspiring-text {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.35);
    letter-spacing: 1px;
    line-height: 1.6;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 底部声明 ========== */
.footer-declaration {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
}

.footer-declaration p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    display: inline-block;
}

/* ========== 设置界面用户信息 ========== */
.current-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    border-radius: 10px;
}

.username-display {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.btn-logout {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(248, 113, 113, 0.4);
}

/* ========== 爆炸动画 ========== */
.explosion-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explosion-particle {
    position: absolute;
    border-radius: 50%;
    animation: explosion 0.8s ease-out forwards;
}

@keyframes explosion {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.explosion-flash {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    animation: flash 0.3s ease-out;
}

@keyframes flash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* ========== 地图卡通背景 ========== */
.map-cartoon-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.map-path-cartoon {
    position: relative;
    z-index: 1;
}

.level-node-cartoon {
    background: linear-gradient(135deg, #FFB6C1 0%, #FF69B4 100%);
    border: 4px solid white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.level-node-cartoon.locked {
    background: linear-gradient(135deg, #808080 0%, #404040 100%);
}

.level-node-cartoon.completed {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

/* 密码重置入口 */
.login-link { background: transparent; border: 0; box-shadow: none; color: #5a67d8; cursor: pointer; font: inherit; font-size: 0.9rem; margin: -6px auto 0; padding: 4px 8px; text-decoration: underline; width: fit-content; }
.login-link:hover { color: #764ba2; transform: none; box-shadow: none; }
.login-form[hidden] { display: none !important; }

.login-links { display: flex; justify-content: center; gap: 12px; margin: -6px 0 0; }
.verification-row { display: flex; gap: 8px; }
.verification-row .form-input { min-width: 0; }
.verification-button { flex: 0 0 auto; margin: 0; padding: 10px 12px; white-space: nowrap; }

.registration-title { color: #333; font-size: 1.45rem; margin: 0 0 4px; text-align: center; }


/* 注册页字段较多：仅在注册模式使用紧凑布局，以便手机屏幕一页完成。 */
.login-card.registration-active {
    padding: 16px 24px;
}

#registration-form {
    gap: 7px;
}

#registration-form .registration-title {
    font-size: 1.2rem;
    line-height: 1.1;
    margin: 0 0 1px;
}

#registration-form .form-group {
    gap: 3px;
}

#registration-form .form-label {
    font-size: 0.82rem;
    line-height: 1;
}

#registration-form .form-input {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
}

#registration-form .verification-row {
    gap: 6px;
}

#registration-form .verification-button {
    padding: 7px 9px;
    font-size: 0.84rem;
}

#registration-form .login-btn {
    padding: 9px 16px;
    margin-top: 1px;
}

#registration-form .login-link {
    font-size: 0.82rem;
    margin: -2px auto 0;
    padding: 1px 6px;
}

@media (max-width: 480px) {
    .login-card.registration-active {
        padding: 10px 18px;
    }

    #registration-form {
        gap: 5px;
    }

    #registration-form .form-input,
    #registration-form .verification-button {
        padding-top: 5px;
        padding-bottom: 5px;
    }
}
