/* ============================================================
   intro.css - 穿越序列动效（6 步状态机）
   ============================================================ */

/* --- 年代选择界面 --- */
#scene-era-selector {
    padding: 40px 20px 20px;
    align-items: center;
}

#scene-era-selector .cover {
    text-align: center;
    margin-bottom: 24px;
}
#scene-era-selector .cover h1 {
    font-size: 36px;
    color: var(--secondary-yellow);
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
#scene-era-selector .cover .subtitle {
    font-size: 18px;
    color: var(--primary-red-light);
    margin-bottom: 8px;
}
#scene-era-selector .cover .slogan {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

#scene-era-selector .intro-tip {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.era-grid,
.era-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 500px;
    width: 100%;
    padding-bottom: 60px;
}

/* 人物立绘显示（年代选择页中央）*/
.portrait-display {
    display: flex;
    justify-content: center;
    margin: 16px 0;
    padding: 12px;
}
.portrait-display .character-portrait {
    transform: scale(0.9);
}

.era-card {
    background: linear-gradient(135deg, var(--bg-mid) 0%, var(--bg-light) 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.era-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--secondary-yellow), var(--primary-red-light));
}
.era-card:hover, .era-card:active {
    border-color: var(--secondary-yellow);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(212, 165, 116, 0.3);
}
.era-card .era-year {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-yellow);
    margin-bottom: 4px;
}
.era-card .era-name {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.era-card .era-fund {
    font-size: 14px;
    color: var(--success);
    font-weight: bold;
}

/* --- 穿越序列（6 步）--- */
#scene-intro-flow {
    background: #000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.intro-step {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Step 1: 黑屏 */
.black-screen {
    width: 100%; height: 100%;
    background: #000;
    animation: fadeIn 0.3s ease-out;
}

/* Step 2: 眼睛睁开 */
.eye-container {
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, #fff 0%, #666 30%, #000 70%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.eye-blur {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.3) 40%, transparent 70%);
    filter: blur(20px);
    animation: eyeOpen 1.5s ease-out forwards;
}
@keyframes eyeOpen {
    0% { transform: scale(0.5); filter: blur(40px); opacity: 0; }
    50% { transform: scale(0.8); filter: blur(30px); opacity: 0.5; }
    100% { transform: scale(1.5); filter: blur(0px); opacity: 1; }
}

/* Step 3: 年代场景 */
.era-bg {
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-mid);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.era-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
}
.era-bg-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
}
.era-bg-city {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    padding: 6px 16px;
    background: rgba(0,0,0,0.4);
    border-radius: 16px;
    z-index: 1;
    backdrop-filter: blur(10px);
}
.era-bg-label {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 96px;
    font-weight: bold;
    color: rgba(212, 165, 116, 0.4);
    letter-spacing: 8px;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.era-bg-event {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    color: var(--secondary-yellow);
    padding: 8px 20px;
    background: rgba(139,26,26,0.6);
    border-radius: 16px;
    z-index: 1;
    border: 1px solid var(--secondary-yellow);
}

/* Step 4: 系统提示横幅 */
.system-banner {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 480px;
    background: linear-gradient(135deg, rgba(139, 26, 26, 0.95) 0%, rgba(192, 57, 43, 0.95) 100%);
    border: 2px solid var(--secondary-yellow);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    z-index: 10;
}
.system-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.system-banner-icon {
    font-size: 28px;
    animation: pulse 2s infinite;
}
.system-banner-text {
    flex: 1;
}
.system-banner-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--secondary-yellow);
    margin-bottom: 4px;
}
.system-banner-desc {
    font-size: 13px;
    color: var(--text-primary);
}

/* Step 5: 打字机 */
.typewriter-container {
    position: relative;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    text-align: center;
}
.typewriter-text {
    font-size: 22px;
    line-height: 1.8;
    color: #fff;
    white-space: pre-wrap;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    min-height: 200px;
    font-family: "STKaiti", "KaiTi", "SimSun", serif;
}
.typewriter-cursor {
    display: inline-block;
    font-size: 22px;
    color: var(--secondary-yellow);
    animation: blink 1s infinite;
    margin-left: 2px;
}
.typewriter-progress {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}
.typewriter-progress-bar {
    height: 100%;
    background: var(--secondary-yellow);
    width: 0%;
    transition: width 0.1s linear;
}

/* Step 6: 等待点击 */
.click-to-start {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}
.click-icon {
    font-size: 48px;
    animation: pulse 1.5s infinite;
    margin-bottom: 8px;
}
.click-text {
    font-size: 16px;
    color: var(--secondary-yellow);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* --- 跳过按钮 --- */
.skip-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}
.skip-btn button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 13px;
    transition: all 0.2s;
}
.skip-btn button:hover {
    background: rgba(255,255,255,0.2);
}

/* --- 白噪音提示 --- */
.white-noise-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--text-tertiary);
    opacity: 0.6;
}