/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --accent-primary: #ff6b6b;
    --accent-secondary: #4ecdc4;
    --code-bg: #2b2b2b;
    --border-color: #404040;
    --terminal-bg: #282c34;
    --terminal-header: #21252b;
    --terminal-text: #abb2bf;
    --terminal-green: #98c379;
    --terminal-blue: #61afef;
    
    /* 标签颜色 */
    --tag-life: #ff6b6b;
    --tag-code: #4ecdc4;
    --tag-thought: #ffd93d;
}

body {
    font-family: 'Fira Code', 'Consolas', monospace;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--terminal-green);
    font-family: 'Fira Code', monospace;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* 主要内容样式 */
main {
    margin-top: 70px;
}

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 终端样式 */
.terminal {
    background-color: var(--terminal-bg);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 2rem auto;
    max-width: 800px;
    overflow: hidden;
}

.terminal-header {
    background-color: var(--terminal-header);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-title {
    color: var(--terminal-text);
    font-size: 0.9rem;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.close { background-color: #ff5f56; }
.minimize { background-color: #ffbd2e; }
.maximize { background-color: #27c93f; }

.terminal-content {
    padding: 1.5rem;
}

.command-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt {
    color: var(--terminal-green);
}

.command {
    color: var(--terminal-blue);
}

/* 日志部分样式 */
.logs-section {
    padding-top: 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    margin-top: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent 0%,
        var(--border-color) 10%,
        var(--border-color) 90%,
        transparent 100%
    );
    margin-top: 0;
}

.log-entry {
    position: relative;
    margin-bottom: 8rem;
    width: 100%;
}

.log-date {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1;
    margin-bottom: 6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.log-content {
    width: 45%;
    margin-left: auto;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 12rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.log-entry:nth-child(even) .log-content {
    margin-left: 0;
    margin-right: auto;
}

.log-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1px;
    right: -1px;
    height: 1px;
    background: linear-gradient(to right,
        transparent,
        var(--border-color),
        transparent
    );
}

.log-entry:nth-child(even) .log-content::before {
    background: linear-gradient(to left,
        transparent,
        var(--border-color),
        transparent
    );
}

/* 标签样式 */
.log-tag {
    position: absolute;
    top: -2.5rem;
    right: 0;
    display: inline-block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.log-tag::before {
    content: '#';
    color: var(--accent-secondary);
    margin-right: 0.2rem;
}

.log-entry:nth-child(even) .log-tag {
    right: auto;
    left: 0;
}

.tag-life {
    color: #a8a8a8;
}

.tag-code {
    color: #a8a8a8;
}

.tag-thought {
    color: #a8a8a8;
}

/* 图片样式 */
.log-image {
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    position: relative;
}

.log-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px 8px 0 0;
}

.log-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0));
    border-radius: 8px 8px 0 0;
}

.log-text {
    color: var(--text-secondary);
    margin-top: 1rem;
}

.log-text pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-text code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* 关于我们样式 */
.about {
    text-align: center;
    background-color: var(--bg-secondary);
    border-radius: 2rem;
    margin: 2rem auto;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    z-index: 0;
}

.about-content {
    max-width: 800px;
    margin: 2rem auto;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.poem {
    margin-bottom: 2rem;
    padding: 2rem;
    background-color: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.poem pre {
    margin: 0;
    text-align: left;
}

.poem code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.about-text {
    font-size: 1.1rem;
    line-height: 2;
}

.about-text p {
    margin: 0.5rem 0;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.about-text p:nth-child(1) { animation-delay: 0.1s; }
.about-text p:nth-child(2) { animation-delay: 0.2s; }
.about-text p:nth-child(3) { animation-delay: 0.3s; }
.about-text p:nth-child(4) { animation-delay: 0.4s; }

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

/* 联系表单样式 */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    padding: 1rem;
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Fira Code', monospace;
}

.contact-form button:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .timeline::before {
        left: 30px;
    }

    .log-date {
        left: 30px;
        transform: none;
    }

    .log-content {
        width: calc(100% - 60px);
        margin-left: 60px;
    }

    .log-entry:nth-child(even) .log-content {
        margin-left: 60px;
        margin-right: 0;
    }

    .log-image {
        margin: -1rem -1rem 1rem -1rem;
    }
}

/* 新增便签按钮样式 */
.add-note-btn {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: var(--accent-primary);
    color: white;
    font-size: 2rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-note-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.cancel-btn,
.submit-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.submit-btn {
    background-color: var(--accent-primary);
    border: none;
    color: white;
}

.cancel-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.submit-btn:hover {
    background-color: #ff5252;
} 