/* RocketBlog Custom Styles */

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-content h1 { font-size: 2.25rem; margin-top: 2.5rem; }
.post-content h2 { font-size: 1.875rem; margin-top: 2rem; }
.post-content h3 { font-size: 1.5rem; margin-top: 1.75rem; }
.post-content h4 { font-size: 1.25rem; margin-top: 1.5rem; }
.post-content h5 { font-size: 1.125rem; margin-top: 1.25rem; }
.post-content h6 { font-size: 1rem; margin-top: 1rem; }

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: #3b82f6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: #2563eb;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: #4b5563;
}

.dark .post-content blockquote {
    color: #9ca3af;
}

.post-content pre {
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.dark .post-content pre {
    background-color: #1f2937;
}

.post-content code {
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    background-color: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

.dark .post-content code {
    background-color: #1f2937;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Card Styles */
.post-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Loading Bar */
#progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    z-index: 1000;
    transition: width 0.2s ease-out;
}

/* Loading Indicator */
#loading-indicator {
    z-index: 1000;
}

/* Ad Placeholders */
.ad-placeholder {
    background-color: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #6b7280;
}

.dark .ad-placeholder {
    background-color: #1f2937;
    border-color: #4b5563;
    color: #9ca3af;
}

/* Keyword Tags */
.keyword-tag {
    display: inline-block;
    background-color: #e5e7eb;
    color: #4b5563;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s, color 0.2s;
}

.dark .keyword-tag {
    background-color: #374151;
    color: #d1d5db;
}

.keyword-tag:hover {
    background-color: #3b82f6;
    color: white;
}

/* Search Results */
#search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dark .search-result-item {
    border-bottom-color: #374151;
}

.search-result-item:hover {
    background-color: #f3f4f6;
}

.dark .search-result-item:hover {
    background-color: #374151;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Infinite Scroll */
#load-more {
    display: block;
    width: 100%;
    padding: 0.75rem;
    text-align: center;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    margin-top: 2rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dark #load-more {
    background-color: #1f2937;
}

#load-more:hover {
    background-color: #e5e7eb;
}

.dark #load-more:hover {
    background-color: #374151;
}

/* Archive Page */
.archive-year {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.dark .archive-year {
    border-bottom-color: #374151;
}

.archive-month {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.archive-post {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid transparent;
    transition: border-color 0.2s;
}

.archive-post:hover {
    border-left-color: #3b82f6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .post-content h1 { font-size: 1.875rem; }
    .post-content h2 { font-size: 1.5rem; }
    .post-content h3 { font-size: 1.25rem; }
    .post-content h4 { font-size: 1.125rem; }
    .post-content h5, .post-content h6 { font-size: 1rem; }
}