/* ================================================================
   LIVEJOURNAL-INSPIRED TEMPLATE
   Teal/dark-cyan top bar · light-grey page bg · white card blocks
   Blue links · clean social-blog aesthetic
   ================================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
    --lj-teal:       #00618a;
    --lj-teal-dark:  #004e70;
    --lj-teal-light: #0082b8;
    --lj-blue:       #2272b5;
    --lj-blue-hov:   #1558a0;
    --lj-bg:         #e8eaec;
    --lj-card:       #ffffff;
    --lj-border:     #d4d8dc;
    --lj-border-soft:#e2e5e8;
    --lj-text:       #222222;
    --lj-text-mid:   #444444;
    --lj-text-soft:  #666666;
    --lj-text-dim:   #999999;
    --lj-topbar-h:   48px;
    --ff-sans: 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    --dur: 0.15s;
    --ease: ease;
    --mw: 1200px;
    --gap: 16px;
    --card-r: 3px;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--lj-bg);
    color: var(--lj-text);
    font-family: var(--ff-sans);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--lj-blue); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--lj-blue-hov); text-decoration: underline; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
.cf::after { content: ''; display: table; clear: both; }


/* ================================================================
   CENTER WRAPPER
   ================================================================ */
.lj-wrap {
    width: 100%;
    max-width: var(--mw);
    margin: 0 auto;
    padding: 0 var(--gap);
}


/* ================================================================
   TOP BAR  (deep teal)
   ================================================================ */
.lj-topbar {
    background: var(--lj-teal);
    height: var(--lj-topbar-h);
    border-bottom: 1px solid var(--lj-teal-dark);
    position: relative;
    z-index: 100;
}

.lj-topbar-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 18px;
    flex-wrap: nowrap;
}

/* Brand */
.lj-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 0;
    flex-wrap: nowrap;
}

.lj-sitename {
    font-family: var(--ff-sans);
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.3px;
}
.lj-sitename:hover { color: rgba(255,255,255,0.85); text-decoration: none; }

.lj-url-sep {
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.35);
    flex-shrink: 0;
}

.lj-fresh {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.lj-fresh-label {
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.lj-fresh-url {
    font-size: 15px;
    font-weight: 700;
    color: #ffe066;
    letter-spacing: 0.2px;
}


/* ================================================================
   BANNER STRIP
   ================================================================ */
.lj-banner {
    margin: 6px 0 4px;
    overflow: hidden;
}


/* ================================================================
   CATEGORY NAV  (white card on grey bg)
   ================================================================ */
.lj-catnav {
    background: var(--lj-card);
    border: 1px solid var(--lj-border);
    border-radius: var(--card-r);
    margin-bottom: 5px;
    padding: 4px 10px 3px;
}

.lj-navrow {
    display: flex;
    align-items: flex-start;
    padding: 3px 0;
    border-bottom: 1px solid var(--lj-border-soft);
}

.lj-navrow:last-child { border-bottom: none; padding-bottom: 0; }

.lj-zone-tag {
    flex-shrink: 0;
    width: 60px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    background: var(--lj-teal);
    border-radius: 2px;
    padding: 2px 3px;
    text-align: center;
    line-height: 1.5;
    margin-right: 10px;
    margin-top: 2px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.lj-navlinks {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
}

.lj-navlinks a {
    color: var(--lj-blue);
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 2px;
    white-space: nowrap;
    transition: background var(--dur), color var(--dur);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.lj-navlinks a:hover {
    background: #e8f3fa;
    color: var(--lj-teal);
    border-bottom-color: var(--lj-teal);
    text-decoration: none;
}

.lj-navlinks a.active {
    background: #e8f3fa;
    color: var(--lj-teal);
    font-weight: 600;
    border-bottom-color: var(--lj-teal);
}


/* ================================================================
   SEARCH BAR
   ================================================================ */
.lj-search-wrap {
    background: var(--lj-card);
    border: 1px solid var(--lj-border);
    border-radius: var(--card-r);
    padding: 7px 10px;
    margin-bottom: 5px;
}

.lj-search-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    width: 100%;
}

.lj-search-row input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 32px;
    background: #f4f6f8;
    border: 1px solid var(--lj-border);
    border-radius: 3px;
    color: var(--lj-text);
    font-family: var(--ff-sans);
    font-size: 13px;
    padding: 0 12px;
    outline: none;
    transition: border-color var(--dur), box-shadow var(--dur);
}

.lj-search-row input[type="text"]:focus {
    border-color: var(--lj-teal-light);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0,130,184,0.15);
}

.lj-search-row input[type="text"]::placeholder { color: var(--lj-text-dim); }

.lj-search-row button {
    flex-shrink: 0;
    height: 32px;
    background: var(--lj-teal);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-family: var(--ff-sans);
    font-size: 12px;
    font-weight: 600;
    padding: 0 12px;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.2px;
    transition: background var(--dur);
}

.lj-search-row button:hover { background: var(--lj-teal-dark); }


/* ================================================================
   HOT TAGS
   ================================================================ */
.lj-hotbar {
    background: var(--lj-card);
    border: 1px solid var(--lj-border);
    border-radius: var(--card-r);
    padding: 6px 10px 5px;
    margin-bottom: 5px;
}

.lj-hotbar-head {
    font-size: 11px;
    font-weight: 700;
    color: var(--lj-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
}

.lj-hotbar-head b { color: var(--lj-teal); }

.lj-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.lj-tag-row .lj-tag {
    font-size: 12px;
    color: var(--lj-blue);
    border-bottom: 1px solid rgba(34,114,181,0.3);
    white-space: nowrap;
    text-decoration: none;
    transition: color var(--dur), border-color var(--dur);
}

.lj-tag-row .lj-tag:hover {
    color: var(--lj-teal);
    border-bottom-color: var(--lj-teal);
    text-decoration: none;
}


/* ================================================================
   CONTENT SECTION CARD
   ================================================================ */
.lj-section {
    background: var(--lj-card);
    border: 1px solid var(--lj-border);
    border-radius: var(--card-r);
    padding: 10px 10px 8px;
    margin-bottom: 5px;
}

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

.lj-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 7px;
    margin-bottom: 9px;
    border-bottom: 2px solid var(--lj-teal);
}

.lj-sec-head h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--lj-teal);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.lj-sec-head h3 a {
    color: var(--lj-teal);
    text-decoration: none;
}

.lj-sec-head h3 a:hover { color: var(--lj-teal-dark); text-decoration: none; }

.lj-sec-count {
    font-size: 11px;
    color: var(--lj-text-dim);
}


/* ================================================================
   FILM GRID
   ================================================================ */
.lj-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.lj-grid-item { display: flex; flex-direction: column; }

.lj-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    background: #d0d4d8;
    aspect-ratio: 600 / 350;
    border-radius: 2px;
    border: 1px solid var(--lj-border-soft);
    transition: border-color var(--dur), box-shadow var(--dur);
}

.lj-thumb:hover {
    border-color: var(--lj-teal-light);
    box-shadow: 0 2px 8px rgba(0,130,184,0.2);
}

.lj-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.lj-thumb:hover img { transform: scale(1.04); }

.lj-caption { padding: 4px 1px 2px; }

.lj-caption p {
    font-size: 12px;
    color: var(--lj-text-soft);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lj-caption p a {
    color: var(--lj-text-soft);
    text-decoration: none;
}

.lj-caption p a:hover { color: var(--lj-teal); text-decoration: none; }


/* ================================================================
   DETAIL PAGE
   ================================================================ */
.lj-detail-title {
    background: var(--lj-card);
    border: 1px solid var(--lj-border);
    border-radius: var(--card-r);
    text-align: center;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.8;
    word-break: break-all;
    margin-bottom: 5px;
    color: var(--lj-text);
}

.lj-detail-title a {
    color: var(--lj-teal);
    font-weight: 700;
    margin-right: 6px;
    text-decoration: none;
}

.lj-detail-title a:hover { color: var(--lj-teal-dark); }

.lj-detail-info {
    background: var(--lj-card);
    border: 1px solid var(--lj-border);
    border-left: 3px solid var(--lj-teal);
    border-radius: var(--card-r);
    font-size: 14px;
    line-height: 1.9;
    padding: 14px 18px;
    margin-bottom: 5px;
    color: var(--lj-text-mid);
}

.lj-capture { margin-top: 10px; width: 100%; }
.lj-capture picture { display: block; width: 100%; }
.lj-capture picture img,
.lj-capture img {
    width: 100%; height: auto; display: block;
    border: 1px solid var(--lj-border);
    border-radius: 2px;
}

/* ── Action buttons ── */
.lj-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.lj-btn {
    display: inline-flex;
    align-items: center;
    background: var(--lj-teal);
    color: #fff;
    font-family: var(--ff-sans);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 3px;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    text-decoration: none;
    transition: background var(--dur), transform var(--dur);
}

.lj-btn:hover {
    background: var(--lj-teal-dark);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.lj-dl-hint {
    text-align: center;
    padding: 5px 0;
    font-size: 13px;
    color: var(--lj-text-soft);
}

.lj-dl-hint a { color: var(--lj-blue); }
.lj-dl-hint a:hover { color: var(--lj-teal); }


/* ── Share strip ── */
.lj-share {
    background: #f4f6f8;
    border: 1px solid var(--lj-border);
    border-radius: var(--card-r);
    padding: 8px 12px;
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lj-share-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--lj-text-soft);
    white-space: nowrap;
}

.lj-share-url {
    flex: 1;
    font-family: monospace;
    font-size: 12px;
    color: var(--lj-text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.lj-share-copy {
    flex-shrink: 0;
    background: var(--lj-teal);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 5px 12px;
    font-family: var(--ff-sans);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--dur);
}

.lj-share-copy:hover { background: var(--lj-teal-dark); }


/* ================================================================
   VIDEO PLAYER
   ================================================================ */
.lj-player {
    margin: 6px 0;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--lj-border);
    border-radius: var(--card-r);
}


/* ================================================================
   PAGINATION
   ================================================================ */
.lj-pager { margin: 12px 0 6px; }

.lj-pager-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.lj-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    background: var(--lj-card);
    border: 1px solid var(--lj-border);
    border-radius: 3px;
    color: var(--lj-blue);
    font-size: 13px;
    text-decoration: none;
    transition: background var(--dur), border-color var(--dur), color var(--dur);
}

.lj-page-btn:hover {
    background: #e8f3fa;
    border-color: var(--lj-teal-light);
    color: var(--lj-teal);
    text-decoration: none;
}

.lj-page-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    background: var(--lj-teal);
    border: 1px solid var(--lj-teal);
    border-radius: 3px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}


/* ================================================================
   FOOTER
   ================================================================ */
.lj-flinks {
    background: var(--lj-card);
    border: 1px solid var(--lj-border);
    border-radius: var(--card-r);
    padding: 8px 10px;
    margin-top: 5px;
}

.lj-flinks-head {
    font-size: 11px;
    font-weight: 700;
    color: var(--lj-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.lj-flinks-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
}

.lj-flinks-list dd { margin: 0; }

.lj-flinks-list a {
    font-size: 12px;
    color: var(--lj-blue);
    border-bottom: 1px solid rgba(34,114,181,0.25);
    text-decoration: none;
    transition: color var(--dur), border-color var(--dur);
}

.lj-flinks-list a:hover {
    color: var(--lj-teal);
    border-bottom-color: var(--lj-teal);
}

.lj-foot {
    background: var(--lj-teal-dark);
    padding: 10px 0;
    margin-top: 5px;
}

.lj-foot-txt {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    line-height: 1.8;
}


/* ================================================================
   VISIBILITY HELPERS
   ================================================================ */
@media (max-width: 768px) { .lj-pc-only { display: none !important; } }
@media (min-width: 769px) { .lj-mob-only { display: none !important; } }


/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ≤480px small phones */
@media (max-width: 480px) {
    /* Zone tag 15% */
    .lj-zone-tag { width: 15%; font-size: 10px; padding: 2px 1px; margin-right: 4px; }
    .lj-navlinks { width: 85%; }
    /* 4 nav items per row → 2 rows for 8 */
    .lj-navlinks a {
        width: calc(25% - 4px);
        font-size: 12px;
        padding: 2px 2px;
        text-align: center;
    }
    /* Film: 2 cols */
    .lj-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    /* Search: single line, no wrap */
    .lj-search-row { flex-wrap: nowrap; }
    .lj-search-row input[type="text"] { font-size: 12px; padding: 0 8px; }
    .lj-search-row button { font-size: 11px; padding: 0 7px; }
    /* Brand */
    .lj-sitename { font-size: 15px; }
    .lj-fresh-url { font-size: 13px; }
    /* Layout padding */
    .lj-wrap { padding: 0 8px; }
}

/* 481–768px medium phones */
@media (min-width: 481px) and (max-width: 768px) {
    .lj-zone-tag { width: 15%; font-size: 10px; padding: 2px 2px; margin-right: 5px; }
    .lj-navlinks { width: 85%; }
    .lj-navlinks a {
        width: calc(25% - 5px);
        font-size: 13px;
        padding: 2px 3px;
        text-align: center;
    }
    .lj-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .lj-search-row { flex-wrap: nowrap; }
}

/* ≥769px PC */
@media (min-width: 769px) {
    .lj-navlinks a { flex: 1; text-align: center; }
    .lj-grid { grid-template-columns: repeat(4, 1fr); }
}
