body { margin: 0; padding: 0; }
.q-page, .q-page-container { padding: 0 !important; }
.nicegui-content { align-items: stretch !important; width: 100%; padding: 0 !important; gap: 0 !important; }
* { box-sizing: border-box; }
body {
    background: #f5f3ff;
    color: #1e1b2e;
    font-family: system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}
nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245,243,255,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(109,40,217,0.1);
    box-shadow: 0 1px 12px rgba(109,40,217,0.06);
}
.nav-inner {
    max-width: 860px; margin: 0 auto; padding: 0 20px;
    height: 54px; display: flex; align-items: center; justify-content: space-between;
}
.nav-left {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.nav-logo {
    font-size: 15px; font-weight: 800; letter-spacing: -0.02em;
    background: linear-gradient(90deg, #7c3aed, #db2777);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-decoration: none; flex-shrink: 0;
}
.kv-hi { color: #7c3aed; -webkit-text-fill-color: #7c3aed; -webkit-text-stroke: 0.9px #1d4ed8; paint-order: stroke fill; }
.nav-link {
    font-size: 13px; font-weight: 500; color: #6b6b8a;
    text-decoration: none; transition: color 0.15s;
    display: flex; align-items: center; gap: 4px;
}
.nav-link:hover { color: #7c3aed; }
.nav-sep { color: rgba(109,40,217,0.25); font-size: 12px; }
.nav-links-group {
    display: flex; align-items: center; gap: 16px;
}
.nav-chat-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff; text-decoration: none; transition: opacity 0.15s;
}
.nav-chat-btn:hover { opacity: 0.88; }

.page-header {
    max-width: 860px; margin: 32px auto 0; padding: 0 20px;
}
.page-header h1 {
    font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
    background: linear-gradient(90deg, #7c3aed, #db2777);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.page-header p { font-size: 13px; color: #6b6b8a; margin-top: 2px; }

#feed {
    max-width: 860px; margin: 20px auto 40px; padding: 0 20px;
    display: flex; flex-direction: column; gap: 1px;
}

#sentinel { height: 1px; }
#loader {
    display: none; text-align: center; padding: 24px;
    color: #9ca3af; font-size: 13px;
}
#loader.visible { display: block; }
#end-msg {
    display: none; text-align: center; padding: 24px;
    color: #9ca3af; font-size: 13px;
}
#end-msg.visible { display: block; }

.search-wrap {
    max-width: 860px; margin: 16px auto 0; padding: 0 20px;
}
.search-box {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1.5px solid rgba(109,40,217,0.18);
    border-radius: 10px; padding: 9px 14px;
    box-shadow: 0 2px 8px rgba(109,40,217,0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box:focus-within {
    border-color: rgba(109,40,217,0.5);
    box-shadow: 0 2px 12px rgba(109,40,217,0.12);
}
.search-icon { color: #9ca3af; font-size: 15px; flex-shrink: 0; }
.search-input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 14px; color: #1e1b2e;
}
.search-input::placeholder { color: #9ca3af; }
.search-clear {
    flex-shrink: 0; cursor: pointer; color: #9ca3af; font-size: 17px;
    line-height: 1; display: none; background: none; border: none; padding: 0;
}
.search-clear.visible { display: block; }
.search-clear:hover { color: #7c3aed; }

/* ── Mobile responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
    .nav-sep { display: none; }
    .nav-breadcrumb { display: none; }
    .nav-link { display: none; }
    .nav-inner { padding: 0 14px; }
    .page-header { margin-top: 20px; }
    #feed { padding: 0 12px; }
    .search-wrap { padding: 0 12px; }
}

/* ── Box Office specific ─────────────────────────────────────── */
.sk {
    background: linear-gradient(90deg, #ede9fe 25%, #f5f3ff 50%, #ede9fe 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 14px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.bo-card {
    background: #fff; border: 1px solid rgba(109,40,217,0.1);
    border-radius: 14px; padding: 16px;
    box-shadow: 0 2px 12px rgba(109,40,217,0.07);
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
    cursor: pointer; display: flex; flex-direction: column; gap: 6px;
}
.bo-card:hover {
    box-shadow: 0 6px 24px rgba(109,40,217,0.15);
    transform: translateY(-2px);
    border-color: rgba(109,40,217,0.25);
}
.bo-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.bo-movie {
    font-size: 14px; font-weight: 700; color: #1e1b2e; line-height: 1.3;
    flex: 1; min-width: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bo-year { font-size: 11px; color: #9ca3af; flex-shrink: 0; padding-top: 2px; }
.bo-badge {
    display: inline-block; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    padding: 2px 9px; border-radius: 20px;
}
.bo-badge.running { background: #d1fae5; color: #065f46; }
.bo-badge.hit     { background: #fef3c7; color: #92400e; }
.bo-badge.flop    { background: #fee2e2; color: #991b1b; }
.bo-badge.neutral { background: #ede9fe; color: #5b21b6; }
.bo-figures { font-size: 12px; color: #6b6b8a; line-height: 1.7; }
.bo-hint { font-size: 10px; color: #a78bfa; font-weight: 500; margin-top: 2px; }

/* ── News specific ───────────────────────────────────────────── */
.news-card {
    display: flex; align-items: flex-start; gap: 14px;
    background: #fff;
    border: 1px solid rgba(109,40,217,0.08);
    border-radius: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-bottom: 8px;
}
.news-card:hover {
    border-color: rgba(109,40,217,0.25);
    box-shadow: 0 2px 12px rgba(109,40,217,0.08);
}
.news-meta {
    display: flex; flex-direction: column; gap: 2px;
    flex-shrink: 0; min-width: 80px; max-width: 88px;
    padding-top: 2px;
}
.news-date { font-size: 11px; color: #9ca3af; }
.news-source {
    font-size: 10px; font-weight: 600; padding: 2px 6px;
    border-radius: 4px; background: #ede9fe; color: #7c3aed;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: inline-block; max-width: 88px;
}
.news-body { flex: 1; min-width: 0; }
.news-title {
    font-size: 14px; font-weight: 600; line-height: 1.4;
    color: #1e1b2e; transition: color 0.15s;
}
.news-card:hover .news-title { color: #7c3aed; }
.news-preview {
    margin-top: 4px;
    font-size: 12px; color: #6b7280; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-tags {
    margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px;
}
.news-tag {
    font-size: 10px; padding: 1px 6px; border-radius: 4px;
    background: #f5f3ff; color: #6b6b8a; border: 1px solid rgba(109,40,217,0.1);
}
.news-tag-link { cursor: pointer; }
.news-tag-link:hover { background: #ede9fe; color: #5b21b6; border-color: rgba(109,40,217,0.25); }
.news-arrow {
    flex-shrink: 0; color: #d1d5db; font-size: 16px;
    transition: color 0.15s; align-self: center;
}
.news-card:hover .news-arrow { color: #7c3aed; }

/* ── Reviews specific ────────────────────────────────────────── */
.review-card {
    display: flex; align-items: flex-start; gap: 14px;
    background: #fff;
    border: 1px solid rgba(109,40,217,0.08);
    border-radius: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-bottom: 8px;
}
.review-card:hover {
    border-color: rgba(109,40,217,0.25);
    box-shadow: 0 2px 12px rgba(109,40,217,0.08);
}
.review-meta {
    display: flex; flex-direction: column; gap: 4px;
    flex-shrink: 0; min-width: 80px; max-width: 88px;
    padding-top: 2px;
}
.review-year { font-size: 11px; color: #9ca3af; }
.review-source {
    font-size: 10px; font-weight: 600; padding: 2px 6px;
    border-radius: 4px; background: #ede9fe; color: #7c3aed;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: inline-block; max-width: 88px;
}
.review-rating {
    font-size: 11px; font-weight: 700; color: #f59e0b;
}
.review-body { flex: 1; min-width: 0; }
.review-title {
    font-size: 14px; font-weight: 700; line-height: 1.4;
    color: #1e1b2e; transition: color 0.15s;
}
.review-card:hover .review-title { color: #7c3aed; }
.review-punchline {
    margin-top: 4px;
    font-size: 12px; color: #6b7280; line-height: 1.45; font-style: italic;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.review-genres {
    margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px;
}
.review-genre {
    font-size: 10px; padding: 1px 6px; border-radius: 4px;
    background: #fce7f3; color: #9d174d; border: 1px solid rgba(219,39,119,0.1);
}
.review-arrow {
    flex-shrink: 0; color: #d1d5db; font-size: 16px;
    transition: color 0.15s; align-self: center;
}
.review-card:hover .review-arrow { color: #7c3aed; }

/* ── SSR intro band (above search) ──────────────────────────────────────── */
.ssr-intro {
    max-width: 860px; margin: 16px auto 0; padding: 0 20px;
}
.ssr-intro.ssr-wide { max-width: 1020px; }
.ssr-intro-card {
    background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
    border: 1px solid rgba(109,40,217,0.12);
    border-radius: 14px; padding: 16px 20px;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.ssr-intro-text { flex: 1; min-width: 0; }
.ssr-intro-text h2 {
    font-size: 14px; font-weight: 800; color: #1e1b2e;
    margin: 0 0 5px; letter-spacing: -0.02em;
}
.ssr-intro-text p {
    font-size: 12px; line-height: 1.6; color: #4b4869; margin: 0;
}
.ssr-cta {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff; text-decoration: none; white-space: nowrap; flex-shrink: 0;
    margin-top: 2px;
}
.ssr-cta:hover { opacity: 0.88; }
.ssr-chips-label {
    font-size: 10px; font-weight: 700; color: #7c3aed;
    text-transform: uppercase; letter-spacing: 0.07em;
    margin: 10px 0 5px; display: block;
}
.ssr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ssr-chip {
    display: inline-flex; align-items: center;
    padding: 5px 12px; border-radius: 22px; font-size: 12px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
    box-shadow: 0 1px 6px rgba(109,40,217,0.08);
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
}
.ssr-chip-movie {
    background: #fff; border: 1px solid rgba(109,40,217,0.2); color: #5b21b6;
}
.ssr-chip-movie:hover { background: #ede9fe; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(109,40,217,0.16); }
.ssr-chip-person {
    background: #fff; border: 1px solid rgba(219,39,119,0.2); color: #9d174d;
}
.ssr-chip-person:hover { background: #fce7f3; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(219,39,119,0.14); }

/* ── SSR static items (below search) ────────────────────────────────────── */
.ssr-feed {
    max-width: 860px; margin: 20px auto 4px; padding: 0 20px;
}
.ssr-feed.ssr-wide { max-width: 1020px; }
.ssr-feed-label {
    font-size: 11px; font-weight: 700; color: #7c3aed;
    text-transform: uppercase; letter-spacing: 0.07em;
    margin: 0 0 9px; display: block;
}
.ssr-list { display: flex; flex-direction: column; gap: 7px; }
.ssr-list-item {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fff; border: 1px solid rgba(109,40,217,0.08);
    border-radius: 11px; padding: 11px 13px;
    text-decoration: none; color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ssr-list-item:hover {
    border-color: rgba(109,40,217,0.22);
    box-shadow: 0 2px 10px rgba(109,40,217,0.08);
}
.ssr-list-badge {
    flex-shrink: 0; font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 20px; margin-top: 2px; white-space: nowrap;
}
.ssr-badge-news    { background: #ede9fe; color: #5b21b6; }
.ssr-badge-year    { background: #f5f3ff; color: #7c3aed; }
.ssr-badge-running { background: #d1fae5; color: #065f46; }
.ssr-badge-hit     { background: #fef3c7; color: #92400e; }
.ssr-badge-flop    { background: #fee2e2; color: #991b1b; }
.ssr-badge-neutral { background: #ede9fe; color: #5b21b6; }
.ssr-list-body { flex: 1; min-width: 0; }
.ssr-list-title {
    font-size: 13px; font-weight: 700; color: #1e1b2e; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ssr-list-item:hover .ssr-list-title { color: #7c3aed; }
.ssr-list-sub {
    font-size: 11px; color: #6b7280; line-height: 1.4; margin-top: 2px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.ssr-list-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.ssr-list-tag {
    font-size: 10px; padding: 1px 6px; border-radius: 4px;
    background: #f5f3ff; color: #6b6b8a; border: 1px solid rgba(109,40,217,0.1);
}
.ssr-list-arrow { flex-shrink: 0; color: #d1d5db; font-size: 14px; align-self: center; }
.ssr-list-item:hover .ssr-list-arrow { color: #7c3aed; }
.ssr-bo-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px;
}
.ssr-bo-card {
    background: #fff; border: 1px solid rgba(109,40,217,0.1); border-radius: 12px;
    padding: 13px; cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.ssr-bo-card:hover { box-shadow: 0 4px 14px rgba(109,40,217,0.12); transform: translateY(-2px); border-color: rgba(109,40,217,0.22); }
.ssr-bo-title { font-size: 13px; font-weight: 700; color: #1e1b2e; margin: 6px 0 4px; line-height: 1.3; }
.ssr-bo-figures { font-size: 11px; color: #6b6b8a; line-height: 1.65; }
.ssr-bo-ask { font-size: 10px; color: #a78bfa; font-weight: 500; margin-top: 5px; }

@media (max-width: 600px) {
    .ssr-intro, .ssr-feed { padding: 0 12px; }
    .ssr-intro-card { flex-direction: column; gap: 10px; }
    .ssr-bo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
