* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Minecraft', 'Courier New', monospace;
    background: #0a0a0a;
    color: #00ff00;
    overflow-x: hidden;
    line-height: 1.6;
}

/* 黑客终端背景效果 */
#terminal-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #001100, #003300, #001100);
    opacity: 0.1;
    z-index: -1;
    animation: matrix 20s infinite linear;
}

@keyframes matrix {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* 导航栏样式 */
.hacker-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 20, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #00ff00;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #00ff00;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-link:hover {
    border: 1px solid #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 英雄区域 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    width: 100%;
}

.hacker-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px #00ff00;
}

.typewriter {
    border-right: 2px solid #00ff00;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { border-color: #00ff00; }
    50% { border-color: transparent; }
}

/* 终端窗口样式 */
.terminal-window {
    background: #001100;
    border: 2px solid #00ff00;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.terminal-header {
    background: #002200;
    padding: 0.5rem 1rem;
    display: flex;
justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #00ff00;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.close { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27c93f; }

.terminal-title {
    color: #00ff00;
    font-size: 0.9rem;
}

.terminal-body {
    padding: 1rem;
    min-height: 200px;
}

.terminal-output p {
    margin: 0.5rem 0;
    color: #00ff00;
}

.terminal-input {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.prompt {
    color: #00ff00;
}

.cursor {
    animation: blink 1s infinite;
    margin-left: 2px;
}

/* 统计数据 */
.hacker-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    color: #00ff00;
    text-shadow: 0 0 15px #00ff00;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #88ff88;
    font-size: 0.9rem;
}

/* 搜索区域 */
.search-section {
    padding: 2rem 0; /* 从4rem减少到2rem */
    background: rgba(0, 20, 0, 0.3);
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-terminal {
    display: flex;
    align-items: center;
    background: #001100;
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 0.8rem; /* 从1rem减少到0.8rem */
    gap: 0.8rem; /* 从1rem减少到0.8rem */
}

.search-prompt {
    color: #00ff00;
    white-space: nowrap;
    font-size: 0.9rem; /* 稍微缩小提示文字 */
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: #88ff88;
}

.search-btn {
    background: #00ff00;
    color: #001100;
    border: none;
    padding: 0.4rem 0.8rem; /* 稍微缩小按钮 */
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem; /* 按钮文字稍微缩小 */
}

.search-btn:hover {
    background: #88ff88;
    box-shadow: 0 0 15px #00ff00;
}

/* 无结果提示样式 */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
}

.no-results-terminal {
    background: #001100;
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
}

.no-results-terminal .terminal-output p {
    color: #ff4444;
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.no-results-terminal .terminal-output p:first-child {
    color: #00ff00;
}

/* 空状态提示 */
.section-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #88ff88;
    font-style: italic;
    border: 1px dashed #00ff00;
    border-radius: 8px;
    background: rgba(0, 30, 0, 0.3);
}

.projects-section, .resources-section, .about-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 0 15px #00ff00;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: #00ff00;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 卡片样式 */
.card {
background: rgba(0, 30, 0, 0.8);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
    border-color: #88ff88;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.3rem;
    color: #00ff00;
    margin-bottom: 0.5rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(0, 255, 0, 0.2);
    color: #88ff88;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.card-description {
    color: #ccffcc;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-link {
    display: inline-block;
    background: #00ff00;
    color: #001100;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.card-link:hover {
    background: #88ff88;
    box-shadow: 0 0 15px #00ff00;
}

/* 关于区域 */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-terminal {
    background: #001100;
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hacker-title {
        font-size: 2rem;
    }
    
    .hacker-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .search-terminal {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
/* 超小屏幕适配 */
@media (max-width: 480px) {
    .hacker-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .terminal-window {
        margin: 1rem auto;
    }
    
    .hacker-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 0.15rem 0.4rem;
    }
    
    .search-input {
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .projects-section, .resources-section, .about-section {
        padding: 3rem 0;
    }
    
    .search-section {
        padding: 3rem 0;
    }
}

/* 平板设备适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .hacker-title {
        font-size: 2.5rem;
    }
    
    .cards-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .terminal-window {
        max-width: 90%;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
        box-shadow: 0 5px 15px rgba(0, 255, 0, 0.1);
    }
    
    .nav-link:hover {
        border-color: transparent;
        text-shadow: none;
    }
    
    .search-btn:hover {
        background: #00ff00;
        box-shadow: none;
    }
    
    .card-link:hover {
        background: #00ff00;
        box-shadow: none;
    }
    
    /* 添加触摸反馈 */
    .card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .nav-link:active {
        background: rgba(0, 255, 0, 0.1);
    }
    
    .search-btn:active {
        transform: scale(0.95);
    }
    .card-link:active {
        transform: scale(0.95);
    }
}

/* 横屏适配 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 120vh;
        padding-top: 70px;
    }
    
    .hacker-stats {
        flex-direction: row;
        gap: 2rem;
    }
    
    .terminal-window {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hacker-title {
        text-shadow: 0 0 30px #00ff00;
    }
    
    .section-title {
        text-shadow: 0 0 20px #00ff00;
    }
    
    .stat-number {
        text-shadow: 0 0 20px #00ff00;
    }
}

/* 防止文本溢出 */
.card-title, .card-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 移动端滚动优化 */
@media (max-width: 768px) {
    html {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        overflow-x: hidden;
    }
    
    /* 改善移动端滚动性能 */
    .cards-container, .terminal-body {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* 移动端导航栏优化 */
@media (max-width: 768px) {
    .hacker-nav {
        position: sticky;
        top: 0;
    }
    
    .nav-menu {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 移动端字体大小优化 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .terminal-output p, .terminal-input {
        font-size: 13px;
    }
}

/* 移动端间距优化 */
@media (max-width: 768px) {
    .hero-content {
        padding: 1rem 0;
    }
    
    .search-container {
        padding: 0 0.5rem;
    }
    
    .cards-container {
        gap: 1rem;
    }
}

/* 删除重复的滚动条样式 */
/* 以下重复的滚动条样式已被删除：
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #001100;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #88ff88;
}
*/

/* 联系链接样式 */
.contact-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid #00ff00;
    border-radius: 4px;
    color: #00ff00;
    text-decoration: none;
    font-family: 'Minecraft', 'Courier New', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(0, 30, 0, 0.3);
}

.contact-link:hover {
    background: #00ff00;
    color: #001100;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 1rem;
}

/* GitHub链接特殊样式 */
.github-link:hover {
    border-color: #6cc644;
    background: #6cc644;
    box-shadow: 0 0 15px rgba(108, 198, 68, 0.5);
}

/* Bilibili链接特殊样式 */
.bilibili-link:hover {
    border-color: #fb7299;
    background: #fb7299;
    box-shadow: 0 0 15px rgba(251, 114, 153, 0.5);
}

/* 移动端联系链接优化 */
@media (max-width: 768px) {
    .contact-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .contact-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        justify-content: center;
    }
}