/* Notion-style Design */
:root {
    --notion-bg: #ffffff;
    --notion-text: #37352f;
    --notion-text-light: #787774;
    --notion-border: #e9e9e7;
    --notion-hover: #f7f6f3;
    --notion-sidebar: #f7f6f3;
    --notion-link: #2383e2;
    --notion-link-hover: #1a6fc7;
    --notion-heading: #000000;
    --notion-gray: #9b9a97;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica', 'Apple Color Emoji', Arial, sans-serif;
    line-height: 1.65;
    color: var(--notion-text);
    background: var(--notion-bg);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--notion-bg);
}

/* Header - Notion Style */
.header {
    background: var(--notion-bg);
    border-bottom: 1px solid var(--notion-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.8);
}

.header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-size: 14px;
    font-weight: 600;
    color: var(--notion-heading);
    letter-spacing: -0.01em;
}

.header h1 a {
    color: var(--notion-heading);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header h1 a:hover {
    opacity: 0.7;
}

.subtitle {
    font-size: 12px;
    color: var(--notion-text-light);
    font-weight: 400;
}

.stats {
    font-size: 12px;
    color: var(--notion-gray);
    padding: 4px 8px;
    background: var(--notion-hover);
    border-radius: 4px;
}

/* Breadcrumbs - Notion Style */
.breadcrumbs {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 96px;
    background: var(--notion-bg);
}

.breadcrumbs a {
    color: var(--notion-text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s ease;
}

.breadcrumbs a:hover {
    color: var(--notion-text);
}

/* Main Content */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 96px 96px;
}

/* Page Title - Notion Style */
.page-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--notion-heading);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 14px;
    color: var(--notion-text-light);
    margin-bottom: 48px;
}

/* Posts Section */
.posts-section {
    margin-bottom: 64px;
}

.posts-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--notion-heading);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

/* Posts Grid - 2 columns for posts with images */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.grid-post-item {
    background: var(--notion-bg);
    border: 1px solid var(--notion-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.grid-post-item:hover {
    border-color: var(--notion-gray);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.grid-post-link {
    text-decoration: none;
    color: var(--notion-text);
    display: block;
}

.grid-post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--notion-hover);
}

.grid-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-post-item:hover .grid-post-image img {
    transform: scale(1.05);
}

.grid-post-content {
    padding: 16px;
}

.grid-post-date {
    font-size: 12px;
    color: var(--notion-gray);
    margin-bottom: 8px;
}

.grid-post-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--notion-heading);
    line-height: 1.4;
    margin-bottom: 8px;
}

.grid-post-excerpt {
    font-size: 14px;
    color: var(--notion-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Posts List - Notion Style */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.post-item {
    background: var(--notion-bg);
    padding: 12px 0;
    border-bottom: 1px solid var(--notion-border);
    transition: background 0.15s ease;
    cursor: pointer;
}

.post-item:hover {
    background: var(--notion-hover);
}

.post-item-link {
    text-decoration: none;
    color: var(--notion-text);
    display: block;
}

.post-item-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.post-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--notion-heading);
    flex: 1;
    line-height: 1.5;
}

.post-item-date {
    font-size: 12px;
    color: var(--notion-gray);
    white-space: nowrap;
    padding-top: 2px;
}

.post-item-excerpt {
    font-size: 14px;
    color: var(--notion-text-light);
    line-height: 1.6;
    margin-top: 4px;
}

/* Single Post - Notion Style */
.post-single {
    max-width: 700px;
}

.post-title-large {
    font-size: 40px;
    font-weight: 700;
    color: var(--notion-heading);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.post-meta-large {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--notion-border);
}

.post-date {
    font-size: 14px;
    color: var(--notion-gray);
}

.original-link {
    color: var(--notion-link);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s ease;
}

.original-link:hover {
    color: var(--notion-link-hover);
}

/* Post Content */
.post-content-full {
    font-size: 16px;
    line-height: 1.65;
    color: var(--notion-text);
}

.post-content-full p {
    margin-bottom: 16px;
}

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

.post-content-full b,
.post-content-full strong {
    font-weight: 600;
    color: var(--notion-heading);
}

.post-content-full a {
    color: var(--notion-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.post-content-full a:hover {
    border-bottom-color: var(--notion-link);
}

.post-content-full blockquote {
    border-left: 3px solid var(--notion-border);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--notion-text-light);
    font-style: italic;
}

.post-content-full img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    margin: 16px 0;
    display: block;
}

.post-content-full br {
    content: "";
    display: block;
    margin: 8px 0;
}

/* Post Images */
.post-images {
    margin: 24px 0;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.post-images img {
    width: 100%;
    border-radius: 3px;
    display: block;
}

/* Similar Posts - Notion Style */
.similar-posts {
    max-width: 700px;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--notion-border);
}

.similar-posts h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--notion-heading);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.similar-posts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.similar-post-item {
    background: var(--notion-bg);
    border: 1px solid var(--notion-border);
    border-radius: 3px;
    padding: 12px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.similar-post-item:hover {
    background: var(--notion-hover);
    border-color: var(--notion-gray);
}

.similar-post-link {
    text-decoration: none;
    color: var(--notion-text);
    display: block;
}

.similar-post-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--notion-heading);
    margin-bottom: 4px;
    line-height: 1.5;
}

.similar-post-excerpt {
    font-size: 13px;
    color: var(--notion-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-post-date {
    font-size: 12px;
    color: var(--notion-gray);
    margin-top: 8px;
}

/* Footer */
.footer {
    background: var(--notion-bg);
    border-top: 1px solid var(--notion-border);
    text-align: center;
    padding: 32px;
    margin-top: 64px;
}

.footer p {
    font-size: 12px;
    color: var(--notion-gray);
}

/* Emoji Support */
.emoji {
    display: inline-block;
    vertical-align: text-top;
}

tg-emoji {
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 24px;
    }
    
    .breadcrumbs {
        padding: 12px 24px;
    }
    
    .main-content {
        padding: 32px 24px 64px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .post-title-large {
        font-size: 32px;
    }
    
    .post-images {
        grid-template-columns: 1fr;
    }
    
    /* Grid posts to 1 column on tablet */
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .grid-post-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .breadcrumbs {
        padding: 12px 16px;
    }
    
    .main-content {
        padding: 24px 16px 48px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .post-title-large {
        font-size: 28px;
    }
    
    .post-item-header {
        flex-direction: column;
        gap: 4px;
    }
    
    .post-item-date {
        align-self: flex-start;
    }
}

/* Loading State */
.loading {
    color: var(--notion-gray);
    text-align: center;
    padding: 48px 0;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 96px 24px;
    color: var(--notion-text-light);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 14px;
}
