/* japan.je yokai pages — shared styles (extracted from the original encyclopedia page 2026-10-23) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #c41e3a;
    --gold: #d4af37;
    --dark-grey: #2c2c2c;
    --light-grey: #fafafa;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark-grey);
    background: var(--light-grey);
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: 300;
    color: var(--primary-red);
    text-decoration: none;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-grey);
    font-weight: 400;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-red);
}

/* Page Header */
.page-header {
    margin-top: 80px;
    padding: 80px 5% 60px;
    background: linear-gradient(135deg, var(--dark-grey) 0%, #1a1a1a 100%);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 100;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.page-header .subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Controls Section */
.controls-section {
    padding: 40px 5%;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 76px;
    z-index: 100;
}

.controls-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--light-grey);
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 400;
    color: var(--dark-grey);
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: white;
    border-color: var(--primary-red);
}

.filter-btn.active {
    background: var(--primary-red);
    color: white;
}

/* Yokai Grid */
.yokai-section {
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.yokai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.yokai-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    cursor: pointer;
}

.yokai-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.yokai-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.yokai-content {
    padding: 25px;
}

.yokai-type {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light-grey);
    color: var(--primary-red);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
    border-radius: 2px;
}

.yokai-card h3 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--dark-grey);
    margin-bottom: 8px;
}

.yokai-japanese {
    font-size: 1rem;
    color: #888;
    margin-bottom: 15px;
    font-style: italic;
}

.yokai-description {
    color: #666;
    line-height: 1.7;
    font-weight: 300;
}

.yokai-traits {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.trait-tag {
    padding: 4px 10px;
    background: var(--light-grey);
    color: #666;
    font-size: 0.85rem;
    border-radius: 2px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
    padding: 40px 20px;
}

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

.modal-content {
    background: white;
    max-width: 900px;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-red);
    color: white;
}

.modal-header {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.modal-body {
    padding: 40px;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
    color: var(--dark-grey);
}

.modal-japanese {
    font-size: 1.3rem;
    color: #888;
    font-style: italic;
    margin-bottom: 20px;
}

.modal-type {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-red);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h4 {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--dark-grey);
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.detail-section p {
    color: #666;
    line-height: 1.8;
    font-weight: 300;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.detail-item {
    padding: 15px;
    background: var(--light-grey);
    border-radius: 4px;
}

.detail-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1rem;
    color: var(--dark-grey);
    font-weight: 400;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: #888;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 60px 5% 30px;
    text-align: center;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
}

.copyright {
    font-size: 14px;
    opacity: 0.7;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .controls-container {
        flex-direction: column;
    }
    
    .yokai-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        padding: 30px 20px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

html {
    scroll-behavior: smooth;
}

/* ---- added 2026-10-23: static cards, intro, entry pages ---- */
a.yokai-card { display: block; color: inherit; text-decoration: none; }
a.yokai-card[hidden] { display: none; }
.yokai-image.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--dark-grey) 0%, #1a1a1a 100%);
    color: var(--gold); font-size: 4rem; font-weight: 200; letter-spacing: 4px;
}
.intro-section { max-width: 900px; margin: 0 auto; padding: 60px 5% 10px; }
.intro-section h2 { font-size: 2rem; font-weight: 300; margin: 30px 0 15px; color: var(--dark-grey); }
.intro-section p { color: #555; line-height: 1.85; font-weight: 300; margin-bottom: 15px; font-size: 1.05rem; }
.intro-section a { color: var(--primary-red); }
.count-note { text-align: center; color: #888; padding: 10px 5% 0; font-size: 0.95rem; }

.breadcrumb { max-width: 900px; margin: 0 auto; padding: 20px 5% 0; font-size: 0.9rem; color: #888; }
.breadcrumb a { color: var(--primary-red); text-decoration: none; }
.entry-hero { margin-top: 70px; position: relative; height: 420px; background: linear-gradient(135deg, var(--dark-grey) 0%, #1a1a1a 100%); overflow: hidden; }
.entry-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; }
.entry-hero .placeholder { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 7rem; font-weight: 200; letter-spacing: 8px; }
.entry-body { max-width: 900px; margin: 0 auto; padding: 30px 5% 60px; }
.entry-body h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 300; color: var(--dark-grey); margin-bottom: 6px; }
.entry-body .modal-type { margin-bottom: 25px; }
.entry-body .detail-section h2 { font-size: 1.25rem; font-weight: 400; color: var(--dark-grey); margin-bottom: 15px; border-bottom: 1px solid #e0e0e0; padding-bottom: 10px; }
.entry-body .lead { font-size: 1.15rem; color: #444; line-height: 1.8; font-weight: 300; margin-bottom: 30px; }
.sources ol { padding-left: 20px; color: #777; font-size: 0.9rem; line-height: 1.7; }
.sources a { color: var(--primary-red); word-break: break-word; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.related-grid a { display: block; padding: 15px; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.06); color: var(--dark-grey); text-decoration: none; border-radius: 4px; }
.related-grid a span { display: block; color: #888; font-style: italic; font-size: 0.9rem; }
.entry-nav { display: flex; justify-content: space-between; gap: 15px; margin-top: 40px; flex-wrap: wrap; }
.entry-nav a { color: var(--primary-red); text-decoration: none; }

/* ---- long-form articles (added 2026-10-23) ---- */
.toc { background: white; border-left: 3px solid var(--primary-red); padding: 18px 24px; margin: 10px 0 35px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.toc h2 { font-size: 0.85rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: #888; margin-bottom: 10px; }
.toc ol { padding-left: 20px; columns: 2; column-gap: 30px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { color: var(--dark-grey); text-decoration: none; }
.toc a:hover { color: var(--primary-red); }
.detail-section.article { scroll-margin-top: 90px; }
.detail-section.article p { margin-bottom: 16px; font-size: 1.05rem; color: #444; }
.detail-section.article h3 { font-size: 1.1rem; font-weight: 500; color: var(--dark-grey); margin: 22px 0 10px; }
.detail-section.article ul { padding-left: 22px; color: #444; line-height: 1.8; margin-bottom: 16px; }
.detail-section.article a { color: var(--primary-red); }
.faq h3 { color: var(--primary-red) !important; }
.article-badge { display: inline-block; margin-left: 8px; padding: 4px 10px; background: var(--gold); color: white; font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; border-radius: 2px; }
@media (max-width: 768px) { .toc ol { columns: 1; } }

/* ---- mobile tap targets (2026-10-23): >=44px tall ---- */
.entry-nav a, .breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.entry-nav { gap: 6px 15px; }
@media (max-width: 768px) {
    .entry-nav { flex-direction: column; align-items: stretch; }
    .entry-nav a { justify-content: center; border: 1px solid #e6e1dd; border-radius: 4px; background: white; }
    .related-grid a { min-height: 44px; }
    .filter-btn { min-height: 44px; }
}
