* {
    box-sizing: border-box;
}

:root {
    --bg: #0f1115;
    --surface: #171a20;
    --surface-2: #20242c;
    --line: #2b303a;
    --text: #f4f6f8;
    --muted: #a8b0bd;
    --brand: #e5484d;
    --brand-dark: #bd2f35;
    --gold: #f2b84b;
    --teal: #53c3b0;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 16px 40px;
    background: rgba(15, 17, 21, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.nav > div {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--muted);
    font-size: 14px;
    transition: color 160ms ease;
}

.nav a:hover {
    color: var(--text);
}

.brand {
    color: var(--text) !important;
    font-size: 21px !important;
    font-weight: bold;
    letter-spacing: 0;
}

.brand::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.14);
}

.nav-user {
    color: var(--gold);
    font-size: 14px;
}

.page {
    width: min(1220px, calc(100% - 36px));
    margin: 0 auto;
    padding: 34px 0 48px;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 22px;
    margin-bottom: 24px;
}

.hero h1,
.auth-box h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: 0;
}

.hero p,
.auth-box p,
.muted {
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--teal) !important;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-box,
.panel,
.movie-card,
.chat-shell,
.feedback-panel,
.side-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.auth-box,
.panel,
.movie-card,
.feedback-panel,
.side-panel {
    padding: 22px;
}

.auth-box {
    max-width: 430px;
    margin: 60px auto;
}

label {
    display: block;
    margin: 14px 0 7px;
    color: #d9dee6;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #3a404b;
    border-radius: 6px;
    background: #101318;
    color: var(--text);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(83, 195, 176, 0.14);
}

button {
    margin-top: 16px;
    padding: 12px 18px;
    border: 0;
    border-radius: 6px;
    background: var(--brand);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

button:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

button:disabled {
    cursor: wait;
    opacity: 0.75;
    transform: none;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.chat-shell {
    padding: 0;
    overflow: hidden;
}

.chat-window {
    min-height: 430px;
    max-height: 560px;
    overflow-y: auto;
    padding: 22px;
    background: #12151b;
    scroll-behavior: smooth;
}

.chat-message {
    max-width: 760px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 8px;
    line-height: 1.5;
    animation: messageIn 220ms ease both;
}

.chat-message span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: bold;
}

.chat-message p {
    margin: 0;
}

.chat-message.user {
    margin-left: auto;
    background: var(--brand);
}

.chat-message.user span {
    color: #ffe1e3;
}

.chat-message.assistant {
    margin-right: auto;
    background: var(--surface-2);
    border: 1px solid #343a45;
}

.typing-message {
    width: 92px;
}

.typing-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.typing-dots i {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    animation: typingPulse 900ms ease-in-out infinite;
}

.typing-dots i:nth-child(2) {
    animation-delay: 120ms;
}

.typing-dots i:nth-child(3) {
    animation-delay: 240ms;
}

.is-hidden {
    display: none;
}

.chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid var(--line);
    background: #101318;
}

.pending-review-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    background: #181c23;
}

.pending-review-bar.is-hidden {
    display: none;
}

.pending-review-bar strong {
    display: block;
    margin-bottom: 4px;
}

.pending-review-bar span {
    color: var(--muted);
    font-size: 14px;
}

.pending-review-bar button {
    flex: 0 0 auto;
    margin-top: 0;
}

.chat-form textarea {
    resize: vertical;
}

.chat-form button {
    align-self: end;
    margin-top: 0;
}

.feedback-panel {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 22px;
    margin-top: 20px;
}

.inline-feedback {
    margin-top: 0;
    border-right: 0;
    border-left: 0;
    border-bottom: 0;
    border-radius: 0;
    background: #181c23;
}

.inline-feedback h2 {
    font-size: 22px;
}

.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(3, 5, 8, 0.72);
    backdrop-filter: blur(8px);
}

.feedback-modal.is-hidden {
    display: none;
}

.feedback-dialog {
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 44px));
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    animation: modalIn 180ms ease both;
}

.modal-close {
    float: right;
    margin-top: 0;
    padding: 8px 11px;
    background: var(--surface-2);
    color: var(--muted);
}

.modal-close:hover {
    background: #2c323d;
    color: var(--text);
}

.feedback-panel h2 {
    margin: 0 0 8px;
}

.feedback-panel p {
    color: var(--muted);
}

.panel-header,
.review-topline {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.panel-header {
    margin-bottom: 14px;
}

.panel-header h2 {
    margin: 0;
    font-size: 22px;
}

.panel-header a {
    color: var(--gold);
    font-size: 14px;
}

.review-list {
    display: grid;
    gap: 12px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.review-card {
    padding: 16px;
    border: 1px solid #303641;
    border-radius: 8px;
    background: #11141a;
}

.review-topline strong {
    line-height: 1.25;
}

.review-topline span {
    flex: 0 0 auto;
    color: #101318;
    background: var(--gold);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
}

.review-card p {
    color: #d9dee6;
    line-height: 1.45;
}

.review-card small {
    color: var(--teal);
}

.alert {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    background: #243447;
}

.success {
    background: #174b2c;
}

.danger {
    background: #5a1818;
}

.warning {
    background: #51420f;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #333;
    text-align: left;
}

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

@keyframes typingPulse {
    0%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 920px) {
    .dashboard-layout,
    .feedback-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .nav {
        align-items: flex-start;
        padding: 16px 20px;
    }

    .page {
        width: min(100% - 24px, 1220px);
        padding-top: 24px;
    }

    .hero {
        display: block;
    }

    .chat-form {
        grid-template-columns: 1fr;
    }

    .pending-review-bar {
        align-items: stretch;
        flex-direction: column;
    }
}
