/* ===== 终端启动动画样式 ===== */

/* 终端覆盖层 */
.terminal-boot {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: #0a0a0f;
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', 'Noto Serif SC', monospace;
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.terminal-boot.fade-out {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

/* 终端标题栏 */
.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(231, 76, 111, 0.2);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot--red { background: #ff5f56; }
.terminal-dot--yellow { background: #ffbd2e; }
.terminal-dot--green { background: #27c93f; }

.terminal-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-left: 12px;
    letter-spacing: 1px;
}

/* 终端内容区 */
.terminal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

.terminal-body::-webkit-scrollbar {
    width: 4px;
}

.terminal-body::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(231, 76, 111, 0.3);
    border-radius: 2px;
}

/* 每行输出 */
.terminal-line {
    color: #c8c8d0;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-all;
    opacity: 0;
    animation: termLineIn 0.3s ease forwards;
}

.terminal-line--command {
    color: #e74c6f;
}

.terminal-line--success {
    color: #27c93f;
}

.terminal-line--warning {
    color: #ffbd2e;
}

.terminal-line--info {
    color: #7b68ee;
}

.terminal-line--accent {
    color: #e74c6f;
    text-shadow: 0 0 10px rgba(231, 76, 111, 0.5);
}

.terminal-line--heart {
    color: #e74c6f;
    font-size: 16px;
    text-shadow: 0 0 15px rgba(231, 76, 111, 0.6);
}

.terminal-line--dim {
    color: rgba(255, 255, 255, 0.3);
}

.terminal-line--bright {
    color: #fff;
    text-shadow: 0 0 8px rgba(231, 76, 111, 0.4);
}

/* 光标闪烁 */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #e74c6f;
    vertical-align: middle;
    margin-left: 2px;
    animation: cursorBlink 0.6s step-end infinite;
}

/* 进度条 */
.terminal-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
    opacity: 0;
    animation: termLineIn 0.3s ease forwards;
}

.terminal-progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.terminal-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e74c6f, #7b68ee);
    border-radius: 4px;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(231, 76, 111, 0.5);
}

.terminal-progress-text {
    color: #e74c6f;
    font-size: 12px;
    min-width: 40px;
}

/* ASCII Art */
.terminal-ascii {
    color: #e74c6f;
    font-size: 10px;
    line-height: 1.2;
    white-space: pre;
    text-shadow: 0 0 10px rgba(231, 76, 111, 0.4);
    opacity: 0;
    animation: termLineIn 0.5s ease forwards;
}

/* 扫描线效果 */
.terminal-boot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* CRT 闪烁 */
.terminal-boot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0);
    pointer-events: none;
    z-index: 2;
    animation: crtFlicker 4s infinite;
}

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

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes crtFlicker {
    0%, 96%, 100% { background: rgba(10, 10, 15, 0); }
    97% { background: rgba(10, 10, 15, 0.02); }
    98% { background: rgba(10, 10, 15, 0); }
    99% { background: rgba(10, 10, 15, 0.01); }
}

/* 响应式 */
@media (max-width: 768px) {
    .terminal-boot {
        padding: 16px;
    }
    .terminal-line {
        font-size: 12px;
        line-height: 1.6;
    }
    .terminal-ascii {
        font-size: 6px;
    }
    .terminal-progress-bar {
        width: 140px;
    }
    .terminal-title {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .terminal-boot {
        padding: 12px;
    }
    .terminal-line {
        font-size: 11px;
        line-height: 1.5;
    }
    .terminal-ascii {
        font-size: 5px;
    }
    .terminal-progress-bar {
        width: 100px;
    }
}
