@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Playfair+Display:ital,wght@1,700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 100;
    padding: 20px 20px 30px 20px;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-link {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: block;
}

.header-logo {
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    animation: slowSpin 20s linear infinite;
    display: block;
}

@keyframes slowSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.site-title {
    margin: 0;
}

.site-title a {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    font-size: 2em;
}

.section-bar {
    position: fixed;
    top: 120px; /* Adjust based on header height + padding */
    left: 0;
    right: 0;
    background: white;
    z-index: 99;
    display: flex;
    border-bottom: 1px solid #eee;
}

.section-bar h2 {
    flex: 1;
    padding: 10px;
    margin: 0;
    font-size: 1.5rem;
    white-space: nowrap;
    box-sizing: border-box;
}

.main-content {
    display: flex;
    flex: 1;
    margin-top: 163px; /* Adjust based on header + section bar height */
    margin-bottom: 60px; /* Adjust based on footer height */
    overflow: hidden; /* Prevent page-level scrolling */
    height: calc(100vh - 163px - 60px); /* Full height minus header and footer */
}

.feeds-container {
    display: flex;
    flex: 1;
    gap: 0;
    height: 100%; /* Ensure full height for scrolling */
}

.feed {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    height: 100%; /* Enable independent scrolling */
}

.feed:first-child {
    border-right: 1px solid #e0e0e0; /* Visual separation between feeds */
}

.feed > h2 {
    display: none; /* Headers now in fixed section-bar */
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.article-card {
    width: 100%;
    height: 400px;
    min-height: 400px;
    max-height: 400px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    box-sizing: border-box;
}

.article-card.has-image {
    background-color: #000;
}

.article-card.no-image {
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 20px;
    box-sizing: border-box;
}

.article-link {
    text-decoration: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    pointer-events: none;
}

.article-link * {
    pointer-events: auto;
}

.article-content {
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.85));
    padding: 32px 20px 20px;
    color: white;
    z-index: 1;
}

.article-card.no-image .article-content {
    position: static;
    background: none;
    padding: 0;
    color: #333;
}

.article-title {
    margin: 0 0 8px 0;
    font-size: 0.91rem;
    font-weight: 700;
    line-height: 1.3;
    color: white;
    overflow: visible;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: left;
}

.article-card.no-image .article-title {
    color: #333 !important;
}

.article-subtitle {
    margin: 8px 0 0 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    color: rgba(255,255,255,0.9);
    overflow: visible;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.article-card.no-image .article-subtitle {
    color: #666 !important;
}

.article-author {
    font-weight: 400;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
}

.article-card.no-image .article-author {
    color: #666;
}

.article-meta {
    font-size: 0.85rem;
    display: flex;
    gap: 10px;
    align-items: center;
    opacity: 0.9;
}

.publication-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
}

.article-card.no-image .publication-name {
    color: #666;
}

.publish-date {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.article-card.no-image .publish-date {
    color: #999;
}

.spinning-emoji-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 180px;
    height: 180px;
    animation: spin 10s linear infinite;
}

.spinning-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    line-height: 1;
    animation: spinEmoji 10s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinEmoji {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.circling-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
}

.circling-text span {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    transform-origin: 0 0;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
}

.bottom-nav a {
    font-family: 'Roboto', sans-serif;
    font-style: italic;
    font-weight: 700;
    text-decoration: none;
    color: #000;
    flex: 1;
    text-align: center;
}

/* Admin Page Styles */
.admin-page .main-content {
    margin-top: 100px;
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    margin-top: 100px;
    margin-bottom: 80px;
}

.admin-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.btn-create {
    background: #000;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-create:hover {
    background: #333;
}

.admin-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.no-posts {
    text-align: center;
    color: #666;
    padding: 40px;
    font-size: 1.1rem;
}

.admin-book-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    transition: box-shadow 0.2s;
    position: relative;
}

.admin-book-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-book-card:hover .admin-card-actions {
    opacity: 1;
}

.admin-card-content {
    display: flex;
    gap: 20px;
    flex: 1;
}

.admin-card-image {
    width: 100px;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: 4px;
}

.admin-card-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
}

.admin-subtitle {
    margin: 0 0 8px 0;
    color: #666;
}

.admin-date {
    margin: 0;
    color: #999;
    font-size: 0.9rem;
}

.admin-card-actions {
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-edit, .btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-edit {
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
}

.btn-edit:hover {
    background: #e0e0e0;
}

.btn-delete {
    background: #ff4444;
    color: white;
}

.btn-delete:hover {
    background: #cc0000;
}

/* Form Styles */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.form-header h1 {
    margin: 0;
    font-size: 2rem;
}

.btn-back {
    background: #f0f0f0;
    color: #333;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-back:hover {
    background: #e0e0e0;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.book-form {
    max-width: 800px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
}

.form-group input[type="file"] {
    padding: 8px;
}

.form-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.current-image {
    margin-bottom: 15px;
}

.current-image p {
    font-size: 0.9rem;
    color: #666;
    margin: 10px 0 0 0;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-submit {
    background: #000;
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #333;
}

.btn-cancel {
    background: #f0f0f0;
    color: #333;
    padding: 12px 32px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

/* Book Post Page Styles */
.book-post-page {
    background: #fafafa;
}

.book-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    margin-top: 100px;
    margin-bottom: 80px;
}

.book-post-article {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.book-post-image {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.book-post-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.book-post-header {
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.book-post-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    color: #000;
}

.book-post-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: #666;
    margin: 0 0 15px 0;
}

.book-post-date {
    font-size: 0.95rem;
    color: #999;
    margin: 0;
}

.book-post-body {
    padding: 40px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

/* Markdown formatting in book posts */
.book-post-body p {
    margin: 0 0 1em 0;
}

.book-post-body em,
.book-post-body i {
    font-style: italic;
}

.book-post-body strong,
.book-post-body b {
    font-weight: 700;
}

.book-post-body h2 {
    font-size: 1.8rem;
    margin: 1.5em 0 0.5em 0;
    font-weight: 700;
}

.book-post-body h3 {
    font-size: 1.4rem;
    margin: 1.2em 0 0.5em 0;
    font-weight: 700;
}

.book-post-body ul,
.book-post-body ol {
    margin: 1em 0;
    padding-left: 2em;
}

.book-post-body li {
    margin: 0.5em 0;
}

.book-post-body blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid #ddd;
    background: #f9f9f9;
    font-style: italic;
}

.book-post-body code {
    background: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.book-post-body pre {
    background: #f5f5f5;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
}

.book-post-body pre code {
    background: none;
    padding: 0;
}

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

.book-post-body a:hover {
    color: #004499;
}
/* Cache bust: 1761184910 */
