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

body {
    font-family: "MS Sans Serif", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #c0c0c0;
    background-image:
        linear-gradient(45deg, #b8b8b8 25%, transparent 25%),
        linear-gradient(-45deg, #b8b8b8 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #b8b8b8 75%),
        linear-gradient(-45deg, transparent 75%, #b8b8b8 75%);
    background-size: 4px 4px;
    background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
    color: #000000;
    line-height: 1.6;
    padding: 20px;
}

/* 跑马灯容器 */
.marquee-container {
    background: #000080;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
    margin-bottom: 20px;
    padding: 10px;
}

.marquee-container marquee {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
}

/* 主容器 */
.main-container {
    max-width: 1024px;
    margin: 0 auto;
    background-color: #c0c0c0;
}

/* Windows 95 风格窗口卡片 */
.window-card,
.section-window {
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -2px -2px 0 #808080, inset 2px 2px 0 #fff, inset -4px -4px 0 #404040, inset 4px 4px 0 #dfdfdf;
    margin-bottom: 20px;
}

.window-titlebar {
    background: linear-gradient(to right, #000080, #1084d0);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.window-title {
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
}

.window-controls {
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 12px;
}

.window-content {
    padding: 16px;
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
}

/* 英雄标题 */
.hero-title {
    font-family: "Arial Black", Impact, Haettenschweiler, sans-serif;
    font-size: 64px;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #808080;
}

.hero-subtitle {
    text-align: center;
    font-size: 20px;
    color: #000080;
    font-weight: bold;
    margin-bottom: 20px;
}

/* 访问计数器 */
.hit-counter {
    background: #000000;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 10px 20px;
    text-align: center;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    font-size: 16px;
}

/* 水平分隔线（凹槽效果） */
.hr-groove {
    border: none;
    height: 4px;
    background: linear-gradient(
        to bottom,
        #808080 0%, #808080 50%,
        #ffffff 50%, #ffffff 100%
    );
    margin: 20px 0;
}

/* 彩虹文字动画 */
@keyframes rainbow {
    0% { color: #ff0000; }
    17% { color: #ff8000; }
    33% { color: #ffff00; }
    50% { color: #00ff00; }
    67% { color: #0080ff; }
    83% { color: #8000ff; }
    100% { color: #ff0000; }
}

.text-rainbow {
    animation: rainbow 4s linear infinite;
}

/* 脉冲发光动画 */
@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px 2px rgba(255, 0, 0, 0.5);
    }
}

.pulse-glow {
    animation: pulse-glow 1.5s ease-in-out infinite;
    display: inline-block;
}

/* 徽章 */
.badge-container {
    text-align: center;
    margin-top: 20px;
}

.badge-new,
.badge-hot {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 10px;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
}

.badge-new {
    background: #ff0000;
}

.badge-hot {
    background: #ffff00;
    color: #000000;
}

/* 关于我部分 */
.about-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.avatar-box {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 100px;
    height: 100px;
    background: #ffffcc;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-text strong {
    color: #000080;
}

/* 技术栈网格 */
.section-intro {
    font-size: 14px;
    color: #808080;
    margin-bottom: 15px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.tech-card {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
}

.tech-card:hover {
    background: #d0d0d0;
}

/* 功能列表 */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    background: #f5f5f5;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
}

.feature-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.feature-text h3 {
    color: #000080;
    margin-bottom: 8px;
    font-size: 16px;
}

.feature-text p {
    font-size: 14px;
    color: #333333;
    line-height: 1.6;
}

/* 项目表格 */
.projects-table {
    width: 100%;
    border-collapse: collapse;
}

.table-header,
.table-row {
    display: flex;
}

.table-header .table-cell,
.table-row .table-cell {
    flex: 1;
    padding: 10px;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    font-size: 13px;
}

.table-header {
    background: #000080;
    color: #ffffff;
    font-weight: bold;
}

.table-header .table-cell {
    border-color: #ffffff;
}

.table-row.even {
    background: #ffffff;
}

.table-row.odd {
    background: #e8e8e8;
}

.project-link {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
}

.project-link:hover {
    color: #000080;
    cursor: default;
}

.status-completed {
    color: #00aa00;
    font-weight: bold;
}

.status-inprogress {
    color: #ff0000;
    font-weight: bold;
}

/* 服务网格 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.service-card {
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
    padding: 15px;
}

.service-header {
    text-align: center;
    margin-bottom: 15px;
}

.service-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.service-header h3 {
    color: #000080;
    font-size: 14px;
    margin: 0;
}

.service-list {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.service-list li {
    padding: 5px 0;
    font-size: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.service-price {
    text-align: center;
    font-weight: bold;
    color: #ff0000;
    font-size: 16px;
    padding: 8px;
    background: #ffffcc;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
}

/* 联系方式 */
.contact-section {
    text-align: center;
}

.contact-item {
    margin: 15px 0;
    padding: 10px;
}

.contact-label {
    font-weight: bold;
    font-size: 16px;
}

.contact-value {
    font-family: 'Courier New', monospace;
    font-size: 20px;
}

.contact-cta {
    margin-top: 30px;
}

.contact-note {
    font-size: 14px;
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    background: #0000ff;
    color: #ffffff;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border: 2px solid;
    border-color: #5555ff #000080 #000080 #5555ff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
    cursor: pointer;
}

.btn-primary:hover {
    background: #2222ff;
}

.btn-primary:active {
    border-color: #000080 #5555ff #5555ff #000080;
    box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
    transform: translate(1px, 1px);
}

.btn-primary:focus {
    outline: 2px dotted #000000;
    outline-offset: 2px;
}

/* 页脚 */
.footer-section {
    text-align: center;
    padding: 20px;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
    background: #c0c0c0;
}

.footer-text p {
    margin: 8px 0;
    font-size: 14px;
}

.footer-text a {
    color: #0000ff;
    text-decoration: underline;
}

.footer-text a:hover {
    color: #ff0000;
}

.footer-note {
    color: #808080;
    font-style: italic;
    margin-top: 15px;
}

/* 装饰性彩色方块 */
.color-squares {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.color-square {
    width: 40px;
    height: 40px;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #dfdfdf;
}

/* 链接样式 */
a {
    color: #0000ff;
    text-decoration: underline;
}

a:hover {
    color: #ff0000;
}

a:visited {
    color: #800080;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        align-items: center;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .table-header .table-cell,
    .table-row .table-cell {
        font-size: 11px;
        padding: 8px 5px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .window-title,
    .window-controls {
        font-size: 12px;
    }
    
    .window-content {
        padding: 12px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon {
        margin: 0 auto;
    }
    
    .marquee-container marquee {
        font-size: 14px;
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    .text-rainbow {
        animation: none;
        color: #ff0000;
    }
    
    .pulse-glow {
        animation: none;
    }
    
    marquee {
        -webkit-animation-play-state: paused;
        animation-play-state: paused;
    }
}