@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fff;
    color: #000;
    line-height: 1.4;
    font-size: 13px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

header {
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

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

header h1 {
    font-size: 16px;
    font-weight: normal;
    margin: 0;
}

.what-is-this-btn {
    background: none;
    border: 1px solid #ccc;
    color: #000;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    font-family: inherit;
}

.what-is-this-btn:hover {
    background: #f0f0f0;
}

.subtitle {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stats {
    font-size: 11px;
    color: #666;
}

.loading {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #666;
}

.spinner {
    display: none;
}

.error {
    padding: 10px;
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    font-size: 12px;
}

.empty {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 12px;
}

.posts-grid {
    column-count: 3;
    column-gap: 20px;
}

@media (max-width: 1200px) {
    .posts-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        column-count: 1;
    }
}

.post-card {
    padding: 12px;
    border: 1px solid #ddd;
    background: #fff;
    break-inside: avoid;
    margin-bottom: 15px;
}

.post-card > *:first-child {
    margin-top: 0;
}

.post-title {
    font-size: 13px;
    margin: 0 0 4px 0;
    line-height: 1.4;
    min-height: 2.8em;
}

.post-title a {
    color: #000;
    text-decoration: none;
}

.post-title a:hover {
    text-decoration: underline;
}

.post-meta {
    font-size: 11px;
    color: #666;
    margin: 0 0 4px 0;
}

.post-meta span {
    margin-right: 8px;
}

.post-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.post-description {
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    margin: 0 0 8px 0;
    padding: 8px 8px 8px 0;
    background: #f9f9f9;
    border-left: 2px solid #ccc;
    word-wrap: break-word;
    text-indent: 0;
}

.post-description p {
    margin: 0 0 8px 0;
}

.post-description p:first-child {
    margin-top: 0;
}

.post-description p:last-child {
    margin-bottom: 0;
}

.post-description br {
    line-height: 1.4;
}

.post-description code {
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 11px;
}

.post-description pre {
    background: #f0f0f0;
    padding: 8px;
    border-radius: 2px;
    overflow-x: auto;
    font-size: 11px;
}

.post-description a {
    color: #0066cc;
    text-decoration: underline;
}

.post-description a:hover {
    color: #004499;
}

.post-description strong,
.post-description b {
    font-weight: 600;
}

.post-description::first-line {
    text-indent: 0;
}

.post-details-meta {
    font-size: 11px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.post-details-meta span {
    color: #666;
}

.post-details-meta strong {
    color: #000;
    font-weight: 500;
}

.post-details-meta .author-link {
    color: #000;
    text-decoration: none;
}

.post-details-meta .author-link:hover {
    text-decoration: underline;
}

.read-more-btn {
    background: none;
    border: 1px solid #ccc;
    color: #000;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    margin-top: 8px;
}

.read-more-btn:hover {
    background: #f0f0f0;
}

.hn-link {
    color: #666;
    text-decoration: none;
    font-size: 11px;
}

.hn-link:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: #666;
    font-size: 11px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

footer a {
    color: #666;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.load-more-container {
    text-align: center;
    padding: 10px 0;
    margin: 10px 0;
}

.load-more-btn {
    background: #fff;
    color: #000;
    border: 1px solid #ccc;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.load-more-btn:hover {
    background: #f0f0f0;
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #ccc;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-close {
    color: #666;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
}

.modal-content h2 {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 500;
}

.modal-content p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    color: #333;
}

.modal-content p:last-child {
    margin-bottom: 0;
}

.modal-content a {
    color: #0066cc;
    text-decoration: underline;
}

.modal-content a:hover {
    color: #004499;
}
