/* Matrix Theme - Main Styles */
:root {
    --matrix-green: #00ff41;
    --matrix-dark-green: #008f11;
    --matrix-black: #0d0208;
    --terminal-bg: rgba(5, 13, 8, 0.9);
    --terminal-header: #1a1a1a;
    --text-color: #d2ded1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'VT323', monospace;
}

body {
    background-color: var(--matrix-black);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 2rem 3.5rem 2rem;
    position: relative;
    overflow-x: hidden;
}

/* Matrix Background Animation */
.matrix-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--matrix-black);
    overflow: hidden;
}

.matrix-background::before {
    content: "";
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: calc(100% + 100px);
    background: repeating-linear-gradient(0deg, 
        rgba(0, 0, 0, 0) 0, 
        rgba(0, 0, 0, 0) 40px, 
        var(--matrix-green) 40px, 
        var(--matrix-green) 40.5px
    );
    animation: matrix-rain 22s linear infinite;
    opacity: 0.1;
}

@keyframes matrix-rain {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100px);
    }
}

/* Terminal Styling */
.terminal {
    width: 100%;
    max-width: 1000px;
    background-color: var(--terminal-bg);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
    overflow: hidden;
    border: 1px solid var(--matrix-dark-green);
    animation: terminal-glow 4s ease-in-out infinite alternate;
    opacity: 0;
    visibility: hidden;
    transform: perspective(1000px) rotateX(5deg) translateY(30px) scale(0.97);
    transition: all 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.terminal.visible {
    opacity: 1;
    visibility: visible;
    transform: perspective(1000px) rotateX(0) translateY(0) scale(1);
}

.terminal:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 0%,
        rgba(0, 255, 65, 0.03) 45%,
        rgba(0, 255, 65, 0.05) 50%,
        rgba(0, 255, 65, 0.03) 55%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.8s ease;
}

.terminal.visible:before {
    opacity: 1;
    animation: terminalScan 2s ease-in-out;
}

@keyframes terminalScan {
    0% {
        transform: translateY(-100%) rotate(5deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100%) rotate(5deg);
        opacity: 0;
    }
}

@keyframes terminal-glow {
    0% {
        box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
    }
    100% {
        box-shadow: 0 0 50px rgba(0, 255, 65, 0.4);
    }
}

.terminal-header {
    background-color: var(--terminal-header);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--matrix-dark-green);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #555;
}

.terminal-buttons span:nth-child(1) {
    background-color: #ff5f56;
}

.terminal-buttons span:nth-child(2) {
    background-color: #ffbd2e;
}

.terminal-buttons span:nth-child(3) {
    background-color: #27c93f;
}

.terminal-title {
    margin-left: auto;
    color: var(--text-color);
    font-size: 14px;
    letter-spacing: 1px;
}

.terminal-content {
    padding: 20px;
    min-height: 60vh;
    max-height: 80vh;
    height: auto;
    overflow-y: auto;
    line-height: 1.5;
    font-size: 18px;
    position: relative;
    scroll-behavior: smooth;
}

.terminal-content::-webkit-scrollbar {
    width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
    background: var(--matrix-black);
}

.terminal-content::-webkit-scrollbar-thumb {
    background: var(--matrix-dark-green);
    border-radius: 4px;
}

/* Terminal Prompts and Text */
.prompt {
    margin: 20px 0;
    display: flex;
    align-items: center;
}

.user {
    color: var(--matrix-green);
    font-weight: bold;
}

.directory {
    color: #3498db;
}

.command {
    margin-left: 8px;
    color: var(--text-color);
}

.typing-text {
    min-height: 20px;
}

.blinking-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.green {
    color: var(--matrix-green);
}

.command-response {
    margin: 15px 0;
    padding-left: 25px;
    border-left: 2px solid var(--matrix-dark-green);
}

.section-header {
    font-size: 20px;
    margin-bottom: 15px;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
}

.section-header:after {
    content: '+';
    position: absolute;
    right: 10px;
    transition: transform 0.3s ease;
}

.section-header.active:after {
    transform: rotate(45deg);
}

.matrix-transition {
    position: relative;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.matrix-transition:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,255,0,0.1) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.matrix-transition.active:before {
    opacity: 1;
}

.hidden {
    display: none;
}

/* Identity Section */
.identity-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 15px;
    position: relative;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 5px;
    border: 2px solid var(--matrix-dark-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    object-fit: cover;
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.profile-image.animate {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.profile-image:after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 5px;
    background: linear-gradient(45deg, 
        transparent 0%,
        rgba(0, 255, 65, 0.2) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.profile-image.animate:after {
    animation: borderGlow 2s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% {
        opacity: 0;
        transform: rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: rotate(360deg);
    }
}

.identity-info {
    flex: 1;
    min-width: 250px;
}

.identity-info h1 {
    font-size: 32px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--matrix-green);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.identity-info.animate h1 {
    opacity: 1;
    transform: translateX(0);
}

.identity-info h1:before {
    content: '>';
    position: absolute;
    left: -20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--matrix-dark-green);
}

.identity-info.animate h1:before {
    opacity: 1;
    transform: translateX(0);
}

.role {
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.3s;
}

.identity-info.animate .role {
    opacity: 1;
    transform: translateY(0);
}

.matrix-quote {
    font-style: italic;
    opacity: 0;
    border-left: 3px solid var(--matrix-dark-green);
    padding-left: 10px;
    margin-top: 15px;
    transform: translateX(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.6s;
    position: relative;
    background: linear-gradient(90deg,
        rgba(0, 143, 17, 0.2) 0%,
        transparent 100%
    );
}

.identity-info.animate .matrix-quote {
    opacity: 0.8;
    transform: translateX(0);
}

.matrix-quote:before {
    content: '';
    position: absolute;
    top: 0;
    left: -3px;
    width: 3px;
    height: 0;
    background: var(--matrix-green);
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.9s;
}

.identity-info.animate .matrix-quote:before {
    height: 100%;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.skill-category {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-category.animate {
    opacity: 1;
    transform: translateY(0);
}

.skill-category h3 {
    color: var(--matrix-green);
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-decoration: underline;
    text-decoration-color: var(--matrix-dark-green);
    position: relative;
    display: inline-block;
}

.skill-category h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--matrix-green);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-category.animate h3:after {
    width: 100%;
}

.skills-list {
    list-style: none;
}

.skills-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-category.animate .skills-list li {
    opacity: 1;
    transform: translateX(0);
}

.skill-category.animate .skills-list li:nth-child(1) {
    transition-delay: 0.2s;
}

.skill-category.animate .skills-list li:nth-child(2) {
    transition-delay: 0.4s;
}

.skill-category.animate .skills-list li:nth-child(3) {
    transition-delay: 0.6s;
}

.skill-name {
    flex: 0 0 100px;
}

.skill-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-left: 15px;
}

.skill-bar span {
    position: absolute;
    height: 100%;
    background: var(--matrix-green);
    background: linear-gradient(90deg, var(--matrix-dark-green) 0%, var(--matrix-green) 100%);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    border: 1px solid var(--matrix-dark-green);
    border-radius: 5px;
    padding: 15px;
    background: rgba(0, 20, 0, 0.2);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    position: relative;
    overflow: hidden;
}

.project-card.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.project-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 65, 0.1),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.animate:before {
    left: 100%;
}

.project-card:nth-child(1) {
    transition-delay: 0.2s;
}

.project-card:nth-child(2) {
    transition-delay: 0.4s;
}

.project-card:nth-child(3) {
    transition-delay: 0.6s;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 5px;
}

.project-header h3 {
    color: var(--matrix-green);
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.project-type {
    font-size: 12px;
    background: var(--matrix-dark-green);
    padding: 3px 8px;
    border-radius: 3px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.animate .project-type {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
}

.project-desc {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.animate .project-desc {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.project-tech span {
    font-size: 14px;
    background: rgba(0, 143, 17, 0.3);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--matrix-dark-green);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.animate .project-tech span {
    opacity: 1;
    transform: translateY(0);
}

.project-card.animate .project-tech span:nth-child(1) {
    transition-delay: 0.5s;
}

.project-card.animate .project-tech span:nth-child(2) {
    transition-delay: 0.6s;
}

.project-card.animate .project-tech span:nth-child(3) {
    transition-delay: 0.7s;
}

/* Contact Section Animation */
.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    position: relative;
}

.contact-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    padding: 10px;
    border: 1px solid var(--matrix-dark-green);
    border-radius: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 20, 0, 0.2);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

.contact-link:nth-child(1) {
    animation: contactFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.2s;
}

.contact-link:nth-child(2) {
    animation: contactFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.4s;
}

.contact-link:nth-child(3) {
    animation: contactFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.6s;
}

.contact-link:nth-child(4) {
    animation: contactFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.8s;
}

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

.contact-link:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 65, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.contact-link:hover {
    background: rgba(0, 143, 17, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 3px 15px rgba(0, 255, 65, 0.3);
}

.contact-link:hover:before {
    left: 100%;
    transition: left 0.8s ease;
}

.contact-icon {
    width: 30px;
    height: 30px;
    background: var(--matrix-dark-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.contact-icon:after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(0, 255, 65, 0.2) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-link:hover .contact-icon:after {
    opacity: 1;
    animation: iconGlow 1.5s ease infinite;
}

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

.contact-text {
    font-size: 16px;
    position: relative;
    transition: transform 0.3s ease;
}

.contact-link:hover .contact-text {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal {
        max-width: 95%;
    }
    
    .identity-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .skills-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .terminal-content {
        font-size: 16px;
        max-height: 70vh;
        padding: 15px;
    }
}

/* 防止文本被选中 */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 矩阵入口加载动画 */
.matrix-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0d0208;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.matrix-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.matrix-code-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}

.matrix-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.loading-text {
    margin-bottom: 20px;
}

.loading-pills {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.pill {
    width: 120px;
    height: 60px;
    margin: 0 20px;
    border-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    letter-spacing: 1px;
    transform: scale(1);
    transition: all 0.3s ease;
    text-shadow: 0 0 10px currentColor;
    box-shadow: 0 0 15px currentColor;
}

.pill:hover {
    transform: scale(1.1);
}

.red-pill {
    border: 2px solid #ff0033;
    color: #ff0033;
    background-color: rgba(255, 0, 51, 0.1);
}

.blue-pill {
    border: 2px solid #0066ff;
    color: #0066ff;
    background-color: rgba(0, 102, 255, 0.1);
}

/* 进度条容器样式 */
.progress-bar {
    width: 400px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 40px auto;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.progress-bar.active {
    opacity: 1;
    transform: translateY(0);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff41, #00ff41);
    width: 0%;
    border-radius: 3px;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent,
        rgba(0, 255, 65, 0.5),
        transparent
    );
    animation: progressGlow 2s linear infinite;
}

@keyframes progressGlow {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

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

.glitch {
    position: relative;
    animation: glitch 1s infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

.terminal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.terminal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 技能条点击效果 */
@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 rgba(0, 255, 65, 0);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 255, 65, 0);
    }
}

.pulse {
    animation: pulse 1s ease;
    position: relative;
    z-index: 1;
}

/* 添加滚动目标高亮效果 */
.section-highlight {
    animation: sectionHighlight 2s ease-out;
}

@keyframes sectionHighlight {
    0% {
        background: rgba(0, 255, 65, 0.2);
    }
    100% {
        background: transparent;
    }
}

/* 帮助模态框样式 */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.help-modal .modal-content {
    background: #000;
    border: 2px solid #0f0;
    padding: 20px;
    border-radius: 5px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    max-width: 500px;
}

.help-modal h2 {
    margin-top: 0;
    color: #0f0;
}

.help-modal ul {
    list-style-type: none;
    padding: 0;
}

.help-modal li {
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
}

.help-modal li:before {
    content: '>';
    position: absolute;
    left: 0;
    color: #0f0;
}

/* 终端主题切换 */
.terminal.light-theme {
    background: #f0f0f0;
    color: #333;
}

.terminal.light-theme .cursor {
    background: #333;
}

/* 折叠和展开样式 */
.collapsible {
    position: relative;
    cursor: pointer;
    padding: 10px;
    background: rgba(0, 20, 0, 0.2);
    border: 1px solid var(--matrix-dark-green);
    border-radius: 4px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.collapsible:hover {
    background: rgba(0, 40, 0, 0.3);
}

.collapsible:after {
    content: '+';
    position: absolute;
    right: 15px;
    transition: transform 0.3s ease, color 0.3s ease;
    color: var(--matrix-green);
}

.collapsible.active:after {
    transform: rotate(45deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease, transform 0.3s ease;
    background: rgba(0, 20, 0, 0.1);
    border-left: 2px solid var(--matrix-dark-green);
    margin-left: 10px;
    padding-left: 15px;
}

/* 矩阵风格过渡效果 */
.matrix-glitch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(0, 255, 65, 0.2) 0%,
        transparent 20%,
        transparent 80%,
        rgba(0, 255, 65, 0.2) 100%
    );
    pointer-events: none;
    opacity: 0;
    animation: matrix-glitch 0.3s ease forwards;
}

@keyframes matrix-glitch {
    0% {
        opacity: 0;
        transform: scaleY(0);
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
    100% {
        opacity: 0;
        transform: scaleY(1);
    }
}

/* 展开/折叠时的内容动画 */
.collapsible-content {
    position: relative;
    transform-origin: top;
}

.collapsible-content.active {
    animation: expand 0.3s ease forwards;
}

@keyframes expand {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }
    100% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* 选择文案样式 */
.choice-text {
    color: #00ff41;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 30px auto;
    text-align: center;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

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

/* 增强药丸按钮的视觉效果 */
.loading-pills {
    margin-top: 40px;
}

.pill {
    width: 150px;
    height: 70px;
    margin: 0 20px;
    border-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    cursor: pointer;
    letter-spacing: 2px;
    transform: scale(1);
    transition: all 0.3s ease;
    text-shadow: 0 0 10px currentColor;
    box-shadow: 0 0 20px currentColor;
    position: relative;
    overflow: hidden;
}

.pill:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 40px;
    background: linear-gradient(45deg, currentColor, transparent);
    z-index: -1;
    animation: borderRotate 4s linear infinite;
}

.red-pill {
    border: 2px solid #ff0033;
    color: #ff0033;
    background-color: rgba(255, 0, 51, 0.1);
}

.blue-pill {
    border: 2px solid #0066ff;
    color: #0066ff;
    background-color: rgba(0, 102, 255, 0.1);
}

.pill:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px currentColor;
}

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

/* 药丸选中状态 */
.pill.selected {
    transform: scale(1.1);
    animation: pillSelected 0.5s ease forwards;
}

.red-pill.selected {
    box-shadow: 0 0 40px rgba(255, 0, 51, 0.6);
    border-width: 3px;
}

.blue-pill.selected {
    box-shadow: 0 0 40px rgba(0, 102, 255, 0.6);
    border-width: 3px;
}

/* 药丸禁用状态 */
.pill.disabled {
    opacity: 0.3;
    transform: scale(0.95);
    cursor: not-allowed;
    filter: grayscale(70%);
    transition: all 0.3s ease;
}

.pill.disabled:hover {
    transform: scale(0.95);
    box-shadow: none;
}

@keyframes pillSelected {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1.1);
    }
}

/* 增强选中药丸的发光效果 */
.pill.selected:before {
    opacity: 0.8;
    animation: borderRotate 2s linear infinite, glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
}

/* Matrix-themed APlayer Styles */
.aplayer {
    background-color: var(--terminal-bg) !important;
    color: var(--matrix-green) !important;
    border: 1px solid var(--matrix-dark-green) !important;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3) !important;
    font-family: 'VT323', monospace !important;
    animation: terminal-glow 4s ease-in-out infinite alternate;
}

.aplayer .aplayer-info {
    border-bottom: 1px solid var(--matrix-dark-green) !important;
}

.aplayer .aplayer-info .aplayer-music .aplayer-title,
.aplayer .aplayer-info .aplayer-music .aplayer-author {
    color: var(--matrix-green) !important;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.aplayer .aplayer-lrc:before,
.aplayer .aplayer-lrc:after {
    background: linear-gradient(to bottom, var(--terminal-bg) 0%, rgba(0, 0, 0, 0) 100%) !important;
}

.aplayer .aplayer-list ol li {
    border-top: 1px solid var(--matrix-dark-green) !important;
}

.aplayer .aplayer-list ol li:hover {
    background-color: rgba(0, 143, 17, 0.2) !important;
}

.aplayer .aplayer-list ol li.aplayer-list-light {
    background-color: rgba(0, 143, 17, 0.3) !important;
}

.aplayer .aplayer-list ol li .aplayer-list-index,
.aplayer .aplayer-list ol li .aplayer-list-title,
.aplayer .aplayer-list ol li .aplayer-list-author {
    color: var(--text-color) !important;
}

.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-title,
.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-author {
    color: var(--matrix-green) !important;
}

.aplayer .aplayer-lrc p {
    color: var(--text-color) !important;
}

.aplayer .aplayer-lrc p.aplayer-lrc-current {
    color: var(--matrix-green) !important;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

/* Control Bar */
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {
    background-color: rgba(0, 143, 17, 0.2) !important;
}

.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {
    background-color: rgba(0, 143, 17, 0.4) !important;
}

.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {
    background-color: var(--matrix-green) !important;
}

.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {
    background-color: var(--matrix-green) !important;
    box-shadow: 0 0 5px var(--matrix-green) !important;
}

/* Buttons */
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path {
    fill: var(--matrix-dark-green) !important;
}

.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path {
    fill: var(--matrix-green) !important;
}

.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-loop.aplayer-icon-loop-on path,
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu.aplayer-icon-menu-on path,
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-lrc.aplayer-icon-lrc-on path,
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-volume-up path {
    fill: var(--matrix-green) !important;
}

.aplayer .aplayer-info .aplayer-controller .aplayer-time {
    color: var(--text-color) !important;
}

/* Mini Mode */
.aplayer.aplayer-withlrc.aplayer-narrow .aplayer-body,
.aplayer.aplayer-fixed .aplayer-body {
    background-color: var(--terminal-bg) !important;
    border: 1px solid var(--matrix-dark-green) !important;
}

.aplayer.aplayer-fixed .aplayer-list {
    border-color: var(--matrix-dark-green) !important;
    background-color: var(--terminal-bg) !important;
}

.aplayer.aplayer-fixed .aplayer-body {
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3) !important;
}

.aplayer.aplayer-fixed .aplayer-miniswitcher {
    background-color: var(--terminal-bg) !important;
    border-left: 1px solid var(--matrix-dark-green) !important;
}

.aplayer.aplayer-fixed .aplayer-miniswitcher .aplayer-icon path {
    fill: var(--matrix-dark-green) !important;
}

.aplayer.aplayer-fixed .aplayer-miniswitcher:hover {
    background-color: rgba(0, 143, 17, 0.2) !important;
}

.aplayer.aplayer-fixed .aplayer-miniswitcher:hover .aplayer-icon path {
    fill: var(--matrix-green) !important;
}

/* Volume Bar */
.aplayer .aplayer-volume-bar-wrap .aplayer-volume-bar {
    background-color: rgba(0, 143, 17, 0.2) !important;
}

.aplayer .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume {
    background-color: var(--matrix-green) !important;
}

/* Adding Matrix code rain behind the player when expanded */
.aplayer.aplayer-withlist.aplayer-expanded {
    position: relative;
    overflow: hidden;
}

.aplayer.aplayer-withlist.aplayer-expanded:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, 
        rgba(0, 0, 0, 0) 0, 
        rgba(0, 0, 0, 0) 40px, 
        var(--matrix-green) 40px, 
        var(--matrix-green) 40.5px
    );
    animation: matrix-rain 22s linear infinite;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* Animate playing song with glitch effect */
.aplayer .aplayer-info .aplayer-music .aplayer-title:not(:hover) {
    animation: glitch 3s infinite alternate;
}

/* Hide scrollbar in list but keep functionality */
.aplayer .aplayer-list::-webkit-scrollbar {
    width: 5px;
}

.aplayer .aplayer-list::-webkit-scrollbar-track {
    background: var(--matrix-black);
}

.aplayer .aplayer-list::-webkit-scrollbar-thumb {
    background: var(--matrix-dark-green);
}

/* 回到顶部按钮样式 */
.scroll-top {
    position: fixed;
    bottom: -60px; /* 初始状态隐藏 */
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid var(--matrix-green);
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    z-index: 1000;
}

.scroll-top.visible {
    bottom: 20px;
    opacity: 1;
}

.scroll-top:before {
    content: '↑';
    color: var(--matrix-green);
    font-size: 24px;
    text-shadow: 0 0 5px var(--matrix-green);
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    background: rgba(0, 40, 0, 0.9);
}

.scroll-top:hover:before {
    animation: arrowBlink 1s infinite;
}

@keyframes arrowBlink {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-3px);
    }
}

.scroll-top:after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 5px;
    background: linear-gradient(45deg, 
        transparent 0%,
        rgba(0, 255, 65, 0.2) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-top:hover:after {
    opacity: 1;
    animation: borderRotate 2s linear infinite;
}

/* 命令行输入样式 */
.command-line-container {
    margin-top: 30px;
}

.command-line {
    display: flex;
    align-items: center;
    font-family: 'VT323', monospace;
    font-size: 18px;
    margin-bottom: 10px;
}

.command-input {
    display: inline-block;
    min-width: 10px;
    outline: none;
    color: var(--text-color);
    caret-color: transparent; /* 隐藏默认光标 */
    margin-left: 8px;
}

.cursor-blink {
    display: inline-block;
    width: 8px;
    height: 18px;
    background-color: var(--matrix-green);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    vertical-align: middle;
}

.command-output {
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.command-output::-webkit-scrollbar {
    width: 5px;
}

.command-output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.command-output::-webkit-scrollbar-thumb {
    background: var(--matrix-dark-green);
    border-radius: 3px;
}

.previous-command {
    margin-bottom: 10px;
    font-family: 'VT323', monospace;
    color: var(--text-color);
}

.command-response {
    margin: 10px 0 20px;
    padding-left: 15px;
    border-left: 2px solid var(--matrix-dark-green);
    animation: fadeIn 0.5s ease;
}

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

/* 命令帮助样式 */
.command-help {
    background: rgba(0, 20, 0, 0.3);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--matrix-dark-green);
}

.command-help ul {
    list-style-type: none;
    padding-left: 10px;
    margin: 10px 0;
}

.command-help li {
    margin: 5px 0;
    position: relative;
    padding-left: 20px;
}

.command-help li:before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--matrix-green);
}

.command-help .hint {
    font-style: italic;
    margin-top: 15px;
    color: var(--matrix-green);
    opacity: 0.8;
}

/* 移动设备命令行样式优化 */
@media (max-width: 768px) {
    .command-line {
        font-size: 16px;
    }
    
    .command-output {
        max-height: 300px;
    }
    
    .command-help li {
        font-size: 14px;
    }
}

/* 退出矩阵特效样式 */
.exit-sequence {
    background: rgba(0, 20, 0, 0.4);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--matrix-dark-green);
    position: relative;
    overflow: hidden;
}

.exit-matrix-rain {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 0;
    opacity: 0.7;
}

.exit-progress {
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--matrix-dark-green);
    margin: 15px 0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.exit-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--matrix-green);
    transition: width 0.2s ease;
    position: relative;
}

.exit-progress-fill:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: scanline 1s linear infinite;
}

/* 进度条状态样式 */
.exit-progress-fill.unstable {
    background: linear-gradient(90deg, #00ff41, #d9ff00);
    animation: progressFlicker 0.5s ease infinite;
}

.exit-progress-fill.critical {
    background: linear-gradient(90deg, #d9ff00, #ff3300);
    animation: progressFlicker 0.2s ease infinite;
}

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

/* 消息更新动画 */
.message-update {
    animation: messageGlitch 0.3s ease;
}

@keyframes messageGlitch {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    20% {
        transform: translateX(-5px);
        opacity: 0.8;
    }
    40% {
        transform: translateX(5px);
        opacity: 0.9;
    }
    60% {
        transform: translateX(-2px);
        opacity: 0.7;
    }
    80% {
        transform: translateX(2px);
        opacity: 0.9;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 故障效果 */
.minor-glitch {
    animation: minorGlitch 0.2s ease;
    position: relative;
}

.major-glitch {
    animation: majorGlitch 0.3s ease;
    position: relative;
}

@keyframes minorGlitch {
    0% {
        transform: translate(0);
        filter: none;
    }
    25% {
        transform: translateX(-5px);
        filter: hue-rotate(90deg);
    }
    50% {
        transform: translateY(3px);
        filter: none;
    }
    75% {
        transform: translateX(5px);
        filter: brightness(1.5) contrast(1.2);
    }
    100% {
        transform: translate(0);
        filter: none;
    }
}

@keyframes majorGlitch {
    0% {
        transform: translate(0);
        filter: none;
    }
    20% {
        transform: translate(-10px, 10px);
        filter: hue-rotate(180deg);
    }
    40% {
        transform: translate(10px, -10px);
        filter: invert(0.5);
    }
    60% {
        transform: translate(-5px, 5px);
        filter: saturate(2) contrast(1.5);
    }
    80% {
        transform: translate(5px, -5px);
        filter: hue-rotate(-90deg) brightness(1.5);
    }
    100% {
        transform: translate(0);
        filter: none;
    }
}

.exit-glitch {
    animation: exitGlitch 0.3s ease infinite;
}

@keyframes exitGlitch {
    0% {
        transform: translate(0);
        opacity: 1;
    }
    20% {
        transform: translate(-10px, 10px);
        opacity: 0.8;
    }
    40% {
        transform: translate(10px, -10px);
        opacity: 0.9;
    }
    60% {
        transform: translate(-5px, 5px);
        opacity: 0.7;
    }
    80% {
        transform: translate(5px, -5px);
        opacity: 0.9;
    }
    100% {
        transform: translate(0);
        opacity: 1;
    }
}

/* 屏幕收缩效果 */
.exit-shrink {
    animation: shrinkEffect 1.5s forwards;
}

@keyframes shrinkEffect {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    70% {
        transform: scale(0.95);
        opacity: 0.8;
        filter: brightness(1.2) contrast(1.2);
    }
    100% {
        transform: scale(0.1);
        opacity: 0;
        filter: brightness(2) contrast(2);
    }
}

/* CRT关机效果 */
.crt-off {
    position: relative;
    overflow: hidden;
}

.crt-off:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: white;
    animation: crtOff 0.5s ease-out forwards;
}

@keyframes crtOff {
    0% {
        top: 50%;
        height: 2px;
        opacity: 1;
    }
    100% {
        top: 0;
        height: 100%;
        opacity: 0;
    }
}

.exit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 10000;
    opacity: 0;
    animation: fadeInOverlay 1.5s forwards;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

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

.exit-overlay-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.exit-message {
    color: var(--matrix-green);
    font-size: 24px;
    text-align: center;
    font-family: 'VT323', monospace;
    opacity: 0;
    animation: fadeInMessage 1s forwards 0.5s;
    text-shadow: 0 0 10px var(--matrix-green);
    position: relative;
    z-index: 1;
}

.exit-message p {
    margin: 15px 0;
    animation: typewriter 1s steps(40) forwards;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
}

.exit-message p:nth-child(1) {
    animation-delay: 0s;
}

.exit-message p:nth-child(2) {
    animation-delay: 1s;
}

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

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* 融化效果覆盖层 */
.melt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 255, 65, 0.1) 50%,
        rgba(0, 0, 0, 1) 100%
    );
    z-index: 10001;
    pointer-events: none;
    animation: meltAnimation 3s forwards;
}

@keyframes meltAnimation {
    0% {
        opacity: 0;
        transform: translateY(-100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 扫描线动画 */
@keyframes scanline {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 全屏退出覆盖层 */
.exit-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(3px);
}

.exit-fullscreen-overlay.active {
    opacity: 1;
}

/* 全屏模式下的退出序列 */
.exit-sequence.fullscreen {
    width: 80%;
    max-width: 1000px;
    background: rgba(0, 20, 0, 0.7);
    padding: 30px;
    border-radius: 8px;
    border: 2px solid var(--matrix-dark-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.exit-sequence.fullscreen p {
    font-size: 1.5rem;
    text-align: center;
    color: var(--matrix-green);
    margin-bottom: 25px;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

.exit-sequence.fullscreen .exit-progress {
    height: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--matrix-dark-green);
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.exit-status-board {
    margin-top: 30px;
    border: 1px solid var(--matrix-dark-green);
    border-radius: 5px;
    background: rgba(0, 20, 0, 0.5);
    padding: 15px;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

.status-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    border-bottom: 1px dashed rgba(0, 143, 17, 0.3);
    transition: all 0.3s ease;
}

.status-item:last-child {
    border-bottom: none;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: #333;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.status-indicator.active {
    background-color: var(--matrix-green);
    box-shadow: 0 0 8px var(--matrix-green);
    animation: pulse 1s infinite;
}

.status-text {
    flex: 1;
    color: #999;
    transition: all 0.3s ease;
}

.status-text.active {
    color: var(--matrix-green);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.status-detail {
    font-size: 0.8rem;
    color: #666;
    margin-left: 10px;
}

.status-item.typing .status-text {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 1s steps(30) forwards;
}

@keyframes typing {
    0% { width: 0; }
    100% { width: 100%; }
}

/* 终端故障覆盖层 */
.terminal-glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 20, 0, 0),
        rgba(0, 255, 65, 0.05),
        rgba(0, 20, 0, 0)
    );
    pointer-events: none;
    z-index: 9999;
    animation: terminalGlitch 0.5s infinite;
}

@keyframes terminalGlitch {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
        transform: translateY(1px);
    }
    100% {
        opacity: 0.3;
    }
}

/* ICP备案信息样式 */
.beian-info {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    background: rgba(5, 13, 8, 0.95);
    border-top: 1px solid var(--matrix-dark-green);
    z-index: 1000;
    font-size: 14px;
    letter-spacing: 1px;
}

.beian-info a {
    color: var(--matrix-dark-green);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.beian-info a:hover {
    color: var(--matrix-green);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

.beian-info a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--matrix-green);
    transition: width 0.3s ease;
}

.beian-info a:hover::after {
    width: 100%;
}
