:root {
    --app-bg: #f4f6fb;
    --app-dark: #111827;
    --app-primary: #4f46e5;
    --app-primary-dark: #3730a3;
    --app-border: #e5e7eb;
    --app-muted: #6b7280;
}

body {
    background: var(--app-bg);
    color: #1f2937;
}

.app-navbar {
    background: linear-gradient(135deg, #111827 0%, #312e81 100%);
    box-shadow: 0 12px 30px rgba(17, 24, 39, .16);
}

.navbar .btn-link {
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    padding: .5rem 0;
}

.navbar .btn-link:hover {
    color: #fff;
}

.app-card {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
}

.app-alert {
    border-radius: 14px;
    border: 0;
}

.btn {
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover {
    background: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

.login-page {
    min-height: calc(100vh - 130px);
}

.login-card {
    overflow: hidden;
}

.login-logo {
    width: 64px;
    height: 64px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    margin-bottom: 16px;
    background: #eef2ff;
    font-size: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.eyebrow {
    color: var(--app-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.result-pill {
    background: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    color: var(--app-muted);
    white-space: nowrap;
}

.search-card .form-control {
    border-radius: 10px;
    border-color: var(--app-border);
    min-height: 44px;
}

.movie-item {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.movie-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .13);
}

.poster-wrap {
    display: block;
    background: #e5e7eb;
}

.card-img-top {
    height: 360px;
    object-fit: cover;
    background: #e9ecef;
}

.lazy-image {
    opacity: 0;
    transition: opacity .25s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1;
}

.card-title {
    line-height: 1.35;
}

.badge {
    border-radius: 999px;
    padding: .38rem .6rem;
}

.empty-state {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 22px;
    padding: 48px 24px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .07);
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 24px;
    background: #eef2ff;
    font-size: 34px;
    margin-bottom: 18px;
}

.empty-state-title {
    font-weight: 800;
}

.empty-state-text {
    color: var(--app-muted);
    max-width: 520px;
    margin: 0 auto 18px;
}

.poster-detail {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
}

.rating-box {
    min-width: 120px;
    padding: 12px 16px;
    border-radius: 16px;
    background: #fef3c7;
    text-align: center;
}

.rating-box span {
    display: block;
    font-size: 12px;
    color: #92400e;
    font-weight: 700;
}

.rating-box strong {
    display: block;
    color: #78350f;
    font-size: 28px;
    line-height: 1;
}

.plot-text {
    color: #374151;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-grid div {
    border: 1px solid var(--app-border);
    border-radius: 14px;
    padding: 14px;
    background: #f9fafb;
}

.detail-grid span {
    display: block;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.detail-grid strong {
    display: block;
    font-weight: 600;
}

@media (max-width: 767px) {
    .page-header {
        display: block;
    }

    .result-pill {
        display: inline-block;
        margin-top: 14px;
    }

    .card-img-top {
        height: 300px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.app-confirm-modal {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.18);
}

.app-confirm-modal .modal-header,
.app-confirm-modal .modal-footer {
    border-color: rgba(0, 0, 0, 0.06);
}

.app-confirm-modal .modal-title {
    font-weight: 700;
}

.app-confirm-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--app-primary);
    font-weight: 800;
}

.app-confirm-wrapper .modal-body {
    color: #4b5563;
    line-height: 1.6;
}

.app-confirm-wrapper .modal-footer {
    background: #f9fafb;
}

.dropdown-item-button {
    cursor: pointer;
}

.dropdown-item-button:focus {
    outline: none;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #F17F29;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.empty-state-title {
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 700;
    color: #503047;
}

.empty-state-message {
    max-width: 420px;
    margin: 0 auto;
    color: #6b5f66;
}