/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

/* 关卡容器 */
.stage {
    display: none;
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

.stage.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 第一关：年龄验证 */
#stage1 .container {
    position: relative;
}

.main-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.button-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
}

.choice-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 120px;
}

.yes-btn {
    background: #4ECDC4;
    color: white;
}

.yes-btn:hover {
    background: #45b7b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.no-btn {
    background: #FF6B6B;
    color: white;
    position: relative;
}

.no-btn:hover {
    background: #FF5252;
}

.no-btn.running {
    position: fixed !important; /* 强制fixed定位 */
    z-index: 1000 !important;   /* 确保在最上层 */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    pointer-events: auto !important; /* 确保可以点击 */
    visibility: visible !important;  /* 确保可见 */
    display: block !important;       /* 确保显示 */
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* 第二关：登录界面 */
.fade-text {
    animation: fadeInText 2s ease-in-out;
}

@keyframes fadeInText {
    0% { opacity: 0; transform: translateY(-20px); }
    50% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.fade-text h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    min-width: 300px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.login-btn {
    width: 100%;
    padding: 0.8rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-btn:hover {
    background: #5a67d8;
}

.hint-message {
    margin: 1rem 0;
    color: #FF6B6B;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hint-message.show {
    opacity: 1;
}

/* ====================================
   找回密码按钮 - 放置在表单下方的合理位置
   ==================================== */
.recover-btn {
    position: absolute;
    bottom: -5rem; /* 相对于登录表单向下偏移 */
    left: 50%;
    transform: translateX(-50%); /* 水平居中 */
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    z-index: 100;
    
    /* 添加轻微的动画吸引注意 */
    animation: breathe 3s ease-in-out infinite;
}

.recover-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.recover-btn.highlight {
    animation: pulse-highlight 1.5s ease-in-out infinite;
    background: linear-gradient(135deg, #FFE66D 0%, #FF8E53 100%);
    color: #333;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 30px rgba(255, 230, 109, 0.5);
}

/* 呼吸动画 - 轻微的缩放效果 */
@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* 高亮脉冲动画 */
@keyframes pulse-highlight {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 8px 30px rgba(255, 230, 109, 0.5);
    }
    50% { 
        transform: scale(1.08);
        box-shadow: 0 12px 40px rgba(255, 230, 109, 0.7);
    }
}

/* 第三关：选择题 */
.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
    max-width: 400px;
}

.option-btn {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #667eea;
    transform: translateY(-2px);
}

.wrong-message {
    font-size: 2rem;
    color: #FF6B6B;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.wrong-message.show {
    opacity: 1;
    transform: scale(1);
}

.transition-text {
    font-size: 1.2rem;
    color: white;
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease 1s;
}

.transition-text.show {
    opacity: 1;
}

/* 第四关：数字选择 */
.number-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin: 2rem 0;
    max-width: 600px;
}

.number-btn {
    aspect-ratio: 1;
    background: #4ECDC4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.number-btn:hover {
    background: #45b7b8;
    transform: scale(1.05);
}

.number-btn:disabled {
    background: #ccc !important;
    color: #999 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.computer-option {
    background: #4ECDC4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.computer-option:hover {
    background: #45b7b8;
    transform: scale(1.05);
}

.reaction-message {
    margin: 2rem 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reaction-message.show {
    opacity: 1;
}

.reaction-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.reaction-text {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    animation: textPop 0.5s ease-out;
}

/* 文字弹出动画 */
@keyframes textPop {
    0% { 
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

.credentials-display {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.credentials-display.show {
    opacity: 1;
    transform: translateY(0);
}

.credential {
    color: #667eea;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}

.back-btn {
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #5a67d8;
}

/* 第五关：正式登录 */
.error-message {
    color: #FF6B6B;
    margin-top: 1rem;
    font-weight: 500;
}

/* 第六关：警告界面 */
.warning-container {
    text-align: center;
    color: white;
}

.warning-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.warning-text {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.switch-btn {
    padding: 1rem 2rem;
    background: #FF8E53;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-btn:hover {
    background: #e07e4a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 142, 83, 0.4);
}

/* 第七关：信件 */
.letter-container {
    max-width: 600px;
    margin: 0 auto;
}

.letter-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    text-align: left;
    line-height: 1.8;
}

.letter-header h2 {
    color: #667eea;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
}

.letter-body p {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1rem;
}

.letter-body .highlight {
    font-size: 1.2rem;
    font-weight: 600;
    color: #FF6B6B;
    text-align: center;
    margin: 2rem 0;
}

.letter-footer {
    margin-top: 2rem;
    text-align: right;
    color: #666;
}

.signature {
    font-weight: 600;
    color: #667eea !important;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
        padding: 0 1rem;
    }
    
    .button-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .choice-btn {
        width: 200px;
    }
    
    .login-form {
        min-width: auto;
        width: 90%;
        max-width: 400px;
    }
    
    .recover-btn {
        bottom: 2rem;
        right: 1.5rem;
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }
    
    .number-grid {
        grid-template-columns: repeat(8, 1fr);
        max-width: 320px;
    }
    
    .letter-content {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .warning-text {
        font-size: 1.5rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.4rem;
    }
    
    .number-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: 280px;
    }
    
    .letter-content {
        padding: 1.5rem 1rem;
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
} 