:root {
    --bg: #0b0d12;
    --panel: #121623;
    --panel2: #0f1320;
    --text: #e9ecf3;
    --muted: #9aa3b2;
    --line: rgba(255, 255, 255, .08);
    --btn: #2b66ff;
    --btn2: #1a2236;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --radius: 16px;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    background: radial-gradient(1200px 700px at 10% 0%, #192040 0%, var(--bg) 55%);
    color: var(--text);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: rgba(11, 13, 18, .75);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    box-shadow: var(--shadow);
}

.title {
    font-weight: 800;
    letter-spacing: .2px;
}

.subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 14px;
    padding: 14px;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(18, 22, 35, .72);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: calc(100vh - 86px);
}

.left {
    display: flex;
    flex-direction: column;
}

.searchbox {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .02);
}

.searchbox input {
    flex: 1;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .25);
    color: var(--text);
    outline: none;
}

.searchbox input:focus {
    border-color: rgba(43, 102, 255, .55);
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    background: var(--btn);
    color: white;
    font-weight: 700;
}

.btn.ghost {
    background: var(--btn2);
    border: 1px solid var(--line);
    color: var(--text);
}

.btn:active {
    transform: translateY(1px);
}

.hint {
    padding: 10px 14px;
    color: var(--muted);
    font-size: 12px;
    border-bottom: 1px solid var(--line);
}

.results {
    padding: 10px;
    overflow: auto;
}

.card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(0, 0, 0, .18);
    cursor: pointer;
    margin-bottom: 10px;
}

.card:hover {
    border-color: rgba(255, 255, 255, .16);
}

.posterThumb {
    width: 54px;
    height: 78px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    overflow: hidden;
    border: 1px solid var(--line);
}

.posterThumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cardTitle {
    font-weight: 800;
    line-height: 1.2;
}

.cardMeta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.details {
    padding: 14px;
}

.details.empty {
    display: grid;
    place-items: center;
    height: 100%;
}

.emptyState {
    text-align: center;
    color: var(--muted);
    padding: 18px;
}

.emptyIcon {
    font-size: 38px;
}

.emptyTitle {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin-top: 6px;
}

.emptyText {
    font-size: 13px;
    margin-top: 8px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.block {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(0, 0, 0, .18);
    padding: 12px;
}

.block.full {
    grid-column: 1 / -1;
}

.label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.value {
    font-weight: 750;
    line-height: 1.35;
    cursor: pointer;
    user-select: text;
    white-space: pre-wrap;
    word-break: break-word;
}

.value:hover {
    opacity: .9;
    text-decoration: underline;
}

.posterBigWrap {
    position: relative;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.posterBig {
    width: 220px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    position: relative;
}

.posterBig img {
    width: 100%;
    display: block;
}

.downloadBtn {
    position: absolute;
    right: 10px;
    top: 10px;
    opacity: 0;
    transition: .15s;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .55);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.posterBig:hover .downloadBtn {
    opacity: 1;
}

.trailer {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .25);
}

.trailer iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .75);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: .18s;
}

.toast.show {
    opacity: 1;
}

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .panel {
        min-height: auto;
    }
}
