@font-face {
    font-family: 'Ark Pixel';
    src: url('./fonts/ark-pixel-12px-monospaced-latin.woff2') format('woff2'),
         url('./fonts/ark-pixel-12px-monospaced-zh_cn.woff2') format('woff2'),
         url('./fonts/ark-pixel-12px-monospaced-zh_tw.woff2') format('woff2'),
         url('./fonts/ark-pixel-12px-monospaced-zh_hk.woff2') format('woff2'),
         url('./fonts/ark-pixel-12px-monospaced-ja.woff2') format('woff2'),
         url('./fonts/ark-pixel-12px-monospaced-ko.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Fusion Pixel';
    src: url('./fonts/fusion-pixel-12px-monospaced-latin.ttf.woff2') format('woff2'),
         url('./fonts/fusion-pixel-12px-monospaced-zh_hans.ttf.woff2') format('woff2'),
         url('./fonts/fusion-pixel-12px-monospaced-zh_hant.ttf.woff2') format('woff2'),
         url('./fonts/fusion-pixel-12px-monospaced-ja.ttf.woff2') format('woff2'),
         url('./fonts/fusion-pixel-12px-monospaced-ko.ttf.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    background-color: black;
    color: #00ff00;
    font-family: 'Ark Pixel', 'Fusion Pixel', 'Courier New', Courier, monospace;
    margin: 20px;
    padding: 0;
}

/* 确保所有表单元素都使用相同的字体 */
input, select, button, textarea {
    font-family: 'Ark Pixel', 'Fusion Pixel', 'Courier New', Courier, monospace;
}

header {
    text-align: center;
    padding: 20px;
    border-bottom: 2px solid #00ff00;
}

h1 {
    font-size: 2.5em;
    margin: 0;
}

.search-bar {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-bar input, .search-bar select, .search-bar button {
    background-color: black;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 5px;
    margin: 5px;
    font-family: 'Ark Pixel', 'Fusion Pixel', 'Courier New', Courier, monospace;
}

.masonry {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
}

.post, .comment {
    background-color: #001a00;
    border: 1px solid #00ff00;
    padding: 10px;
    width: calc(33% - 20px);
    box-sizing: border-box;
    padding-bottom: 20px;
}

.post h2 {
    margin: 0 0 10px 0;
}

.post h2 a {
    color: #00ff00;
    text-decoration: none;
    cursor: pointer;
}

.post h2 a:hover {
    color: #00cc00;
    text-decoration: underline;
}

.comment {
    width: 100%;
    max-width: 800px;
    margin: 10px auto;
    padding: 15px;
    background-color: #002200;
    border-radius: 5px;
    box-shadow: 0 0 10px #00ff00;
}

.hidden {
    display: none;
}

/* Different color for nested comments */
.comment-nested {
    background-color: #003300;
    margin-left: 20px;
    border-left: 2px solid #00ff00;
    padding-left: 10px;
}

a {
    color: #00ff00;
    text-decoration: none;
}

a:hover {
    color: #00cc00;
    text-decoration: underline;
}

/* Loading indicator styles */
.loading-indicator {
    text-align: center;
    padding: 20px;
    font-size: 1.2em;
    color: #00ff00;
    background-color: #001a00;
    border: 1px solid #00ff00;
    margin: 10px 0;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.loading-indicator p {
    margin: 0;
    animation: pulse 1.5s infinite;
}

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

/* Mobile close button styles */
.mobile-close-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1000;
    background-color: black;
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 8px 12px;
    font-family: 'Ark Pixel', 'Fusion Pixel', 'Courier New', Courier, monospace;
    font-size: 16px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.mobile-close-btn:hover {
    background-color: #00ff00;
    color: black;
}

.mobile-close-btn:active {
    transform: scale(0.95);
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    body {
        margin: 10px;
    }
    
    header {
        padding: 10px;
        position: relative;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .search-bar {
        flex-direction: column;
        gap: 5px;
    }
    
    .search-bar input, .search-bar select, .search-bar button {
        width: 100%;
        max-width: 300px;
        margin: 3px 0;
    }
    
    .masonry {
        flex-direction: column;
        padding: 10px;
    }
    
    .post, .comment {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .comment-nested {
        margin-left: 10px;
    }
    
    /* Show mobile close button only on mobile */
    .mobile-close-btn {
        display: block;
    }
}
