@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --background: #1f1f1f;
    --foreground: #f2f2f2;
    --card: #292929;
    --muted: #333333;
    --muted-foreground: #999999;
    --secondary-foreground: #e5e5e5;
    --primary: #dc2626;
    --primary-foreground: #ffffff;
    --border: #3d3d3d;
    --video-controls: rgba(20, 20, 20, 0.9);
    --video-progress-track: #666666;
    --support-btn: #b91c1c;
    --success: #1f7a45;
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--foreground);
    font-family: 'Inter', sans-serif;
}

body.is-modal-open {
    overflow: hidden;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
}

.app-shell,
.page-shell {
    min-height: 100vh;
}

.app-shell {
    display: flex;
    flex-direction: column;
}

.app-container,
.site-header__inner,
.page-content {
    width: min(1480px, calc(100vw - 32px));
    margin: 0 auto;
}

.app-header,
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(31, 31, 31, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #2c2c2c;
}

.app-header__inner,
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 10px 0 12px;
}

.brand-panel {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-width: 320px;
    padding: 8px 12px 8px 14px;
    border: 1px solid #353535;
    border-radius: 2px;
    background:
        linear-gradient(180deg, rgba(70, 70, 70, 0.15) 0%, rgba(22, 22, 22, 0.95) 48%, rgba(18, 18, 18, 1) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 1px 1px rgba(0, 0, 0, 0.4);
}

.brand-panel__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-family: 'Inter', sans-serif;
}

.brand-panel__logo-image {
    display: block;
    width: auto;
    height: 30px;
    max-width: 140px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-panel__logo-red {
    color: #f0322d;
}

.brand-panel__logo-light {
    color: #f2f2f2;
}

.brand-panel__actions {
    display: inline-flex;
    align-items: center;
    gap: 20px;
}

.brand-panel__mobile-auth-row {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.brand-panel__icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 29px;
    padding: 0;
    border: 1px solid #434343;
    border-radius: 5px;
    background: linear-gradient(180deg, #303030 0%, #222222 100%);
    color: #f3f3f3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.brand-panel__icon-button:hover {
    background: linear-gradient(180deg, #373737 0%, #272727 100%);
}

.brand-panel__icon {
    width: 16px;
    height: 16px;
}

.header-nav-wrap {
    display: flex;
    flex: 1;
    justify-content: center;
}

.app-header__auth {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.app-header__auth-link,
.site-header__welcome,
.app-header__welcome {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #434343;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: #f0dfdb;
    font-size: 13px;
    font-weight: 600;
}

.app-header__auth-link:hover {
    color: #ffffff;
    border-color: rgba(255, 126, 106, 0.45);
}

.app-header__auth-link--primary {
    border-color: #8f2c27;
    background: linear-gradient(180deg, #b93a35 0%, #91231f 100%);
    color: #fff3f0;
}

.app-header__auth-link--primary:hover {
    border-color: #a53a33;
    background: linear-gradient(180deg, #cb4640 0%, #a22823 100%);
}

.app-header__logout-form {
    margin: 0;
}

.app-brand,
.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-brand__icon,
.brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: var(--primary-foreground);
}

.app-brand__icon svg,
.brand__mark svg {
    width: 20px;
    height: 20px;
    margin-left: 2px;
}

.brand__logo-image {
    display: block;
    width: auto;
    height: 36px;
    max-width: 150px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-brand__text,
.brand__text {
    font-size: 32px;
    letter-spacing: 0.08em;
    color: var(--foreground);
}

.app-nav {
    display: none;
    align-items: center;
    gap: 24px;
}

.app-nav__link,
.ghost-link {
    font-size: 14px;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}

.app-nav__link:hover,
.ghost-link:hover {
    color: var(--foreground);
}

.app-nav__link.is-active {
    color: var(--primary);
    font-weight: 600;
}

.app-main,
.page-content {
    flex: 1 0 auto;
    padding: 2px 0;
}

.app-footer {
    margin-top: auto;
    border-top: 1px solid #2f2424;
    background:
        linear-gradient(180deg, rgba(47, 20, 20, 0.24) 0%, rgba(20, 12, 12, 0.98) 55%, rgba(17, 11, 11, 1) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-footer__inner {
    display: flex;
    justify-content: center;
    padding: 10px 0 12px;
}

.footer-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.footer-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 13px;
    border: 0;
    background: transparent;
    color: #8e7c79;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.footer-nav__link:hover {
    color: #d8c7bf;
}

.footer-nav__link + .footer-nav__link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
}

.footer-nav__link--button {
    font: inherit;
}

.top-tabs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    row-gap: 6px;
    padding: 4px 6px;
    border: 1px solid #4a2d2d;
    border-radius: 3px;
    background:
        linear-gradient(180deg, rgba(66, 20, 20, 0.45) 0%, rgba(19, 10, 10, 0.98) 52%, rgba(16, 9, 9, 1) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.45);
}

.top-tabs__link,
.top-tabs__support {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.top-tabs__link {
    color: #f0deda;
    font-weight: 500;
}

.top-tabs__link:hover {
    color: #ffffff;
}

.top-tabs__link.is-active {
    color: #ffffff;
    font-weight: 600;
}

.top-tabs__link.is-active::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: -6px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff8b77 0%, #ff6554 100%);
    box-shadow: 0 0 8px rgba(255, 117, 97, 0.75);
}

.top-tabs__support {
    appearance: none;
    margin-left: 8px;
    padding: 0 11px;
    border-radius: 6px;
    border: 1px solid #8f2c27;
    background: linear-gradient(180deg, #b93a35 0%, #91231f 100%);
    color: #fff3f0;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.top-tabs__support:hover {
    background: linear-gradient(180deg, #cb4640 0%, #a22823 100%);
}

.top-tabs__icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.top-tabs__icon--home {
    display: none;
}

.top-tabs__icon--support {
    width: 12px;
    height: 12px;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.video-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.video-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-player--embed {
    overflow: hidden;
}

.video-player__media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.video-player__embed {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000000;
}

.video-player__source-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    z-index: 2;
}

.video-player__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.video-player__overlay-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(242, 242, 242, 0.3);
    transition: border-color 0.2s ease;
}

.video-player__overlay:hover .video-player__overlay-circle {
    border-color: rgba(242, 242, 242, 0.6);
}

.video-player__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--video-controls);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.video-player.is-controls-visible .video-player__controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.player-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 0;
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    transition: color 0.2s ease;
}

.player-icon-button:hover {
    color: var(--primary);
}

.player-progress {
    position: relative;
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: var(--video-progress-track);
    border: 0;
    padding: 0;
    cursor: pointer;
}

.player-progress__track {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--primary);
}

.player-progress__thumb {
    position: absolute;
    left: 0;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--primary);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.icon {
    display: block;
    flex-shrink: 0;
}

.icon--overlay {
    width: 24px;
    height: 24px;
}

.icon--mini {
    width: 14px;
    height: 14px;
}

.icon--button {
    width: 14px;
    height: 14px;
}

.icon--pause {
    display: none;
}

.video-player.is-playing .icon--play {
    display: none;
}

.video-player.is-playing .icon--pause {
    display: block;
}

.icon--muted {
    display: none;
}

.video-player.is-muted .icon--volume {
    display: none;
}

.video-player.is-muted .icon--muted {
    display: block;
}

.video-player.is-playing .video-player__overlay {
    opacity: 0;
    pointer-events: none;
}

.video-card__title-wrap {
    padding: 10px 10px 8px;
}

.video-card__title {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.video-card__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 0 9px 6px;
}

.video-card__actions form,
.video-card__support form {
    margin: 0;
    width: 100%;
}

.action-button,
.comment-submit,
.button,
.ghost-link {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.action-button {
    position: relative;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 31px;
    padding: 6px 8px;
    border: 1px solid #47474b;
    border-radius: 5px;
    background: linear-gradient(180deg, #37373a 0%, #2c2c2f 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #f0f0f0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.action-button__badge {
    position: absolute;
    top: -8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 1px solid rgba(220, 38, 38, 0.45);
    border-radius: 999px;
    background: linear-gradient(180deg, #ff675a 0%, #c92e24 100%);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    z-index: 2;
}

.action-button:hover,
.action-button--summary:hover {
    background: linear-gradient(180deg, #3d3d41 0%, #303034 100%);
}

.action-button.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

.action-button--summary {
    list-style: none;
}

.action-button--summary::-webkit-details-marker {
    display: none;
}

.comment-details {
    display: block;
    width: 100%;
}

.comment-details[open] {
    grid-column: 1 / -1;
}

.comment-details[open] .action-button--summary {
    margin-bottom: 8px;
}

.comment-panel {
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--muted);
}

.comment-panel__meta,
.comment-item__meta span,
.comment-list__empty {
    color: var(--muted-foreground);
    font-size: 12px;
}

.comment-panel__meta {
    margin: 0 0 10px;
}

.comment-panel__signed-in {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 13px;
    line-height: 1.5;
}

.comment-panel__signed-in strong {
    color: var(--foreground);
}

.comment-list {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.comment-item {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.comment-item__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.comment-item strong {
    font-size: 12px;
    color: var(--foreground);
}

.comment-item p {
    margin: 0;
    color: var(--secondary-foreground);
    font-size: 12px;
    line-height: 1.5;
}

.comment-form,
.admin-form {
    display: grid;
    gap: 10px;
}

.comment-form input[type="text"],
.comment-form input[type="password"],
.comment-form input[type="number"],
.comment-form textarea,
.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    color: var(--foreground);
    outline: none;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="password"]:focus,
.comment-form input[type="number"]:focus,
.comment-form textarea:focus,
.admin-form input[type="text"]:focus,
.admin-form input[type="password"]:focus,
.admin-form input[type="number"]:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: var(--primary);
}

.comment-submit,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--foreground);
    cursor: pointer;
    font-weight: 600;
}

.comment-submit:hover,
.button:hover {
    background: var(--muted);
}

.video-card__support {
    padding: 0 9px 9px;
}

.support-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 31px;
    padding: 8px 12px;
    border: 1px solid #8f241f;
    border-radius: 6px;
    background: linear-gradient(180deg, #c43b31 0%, #ae281f 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--primary-foreground);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.support-button:hover,
.support-button.is-supported {
    background: linear-gradient(180deg, #d8443a 0%, #b92c22 100%);
    border-color: #9f2b24;
}

.support-button .icon--button {
    width: 16px;
    height: 16px;
}

.support-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 12px;
}

.support-modal[hidden] {
    display: none;
}

.support-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.74);
    backdrop-filter: blur(3px);
}

.support-modal__dialog {
    position: relative;
    width: min(365px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    border: 1px solid #3f2e2a;
    border-radius: 12px;
    overflow: hidden;
    background:
        radial-gradient(circle at top center, rgba(104, 52, 42, 0.26) 0%, transparent 22%),
        linear-gradient(180deg, #231a1b 0%, #151113 100%);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.support-modal__header,
.support-modal__section,
.support-modal__submit-form,
.support-modal__close-link {
    position: relative;
    z-index: 1;
}

.support-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 14px 12px;
    border-bottom: 1px solid #5f4037;
}

.support-modal__header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #f7f2eb;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.support-modal__header-icons {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.support-modal__heart,
.support-modal__close-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.support-modal__heart {
    color: #ff4a43;
}

.support-modal__heart svg,
.support-modal__close-icon svg {
    width: 20px;
    height: 20px;
}

.support-modal__close-icon {
    border: 0;
    padding: 0;
    background: transparent;
    color: #f3e6dd;
    cursor: pointer;
}

.support-modal__section {
    padding: 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.support-modal__section--payment {
    padding-top: 14px;
}

.support-modal__message {
    margin: 0;
    color: #f0e4d8;
    font-size: 13px;
    line-height: 1.65;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.support-modal__minimum {
    margin: 14px 0 0;
    color: #d9b16a;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.support-modal__payment-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #575757;
    border-radius: 5px;
    background: linear-gradient(180deg, #f5f5f5 0%, #c6c6c6 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.support-modal__payment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.support-modal__payment-badge svg {
    width: 28px;
    height: 28px;
}

.support-modal__payment-name {
    color: #15733b;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.support-modal__payment-number {
    margin-left: auto;
    color: #333333;
    font-size: 13px;
    font-weight: 800;
}

.support-modal__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 100px);
    min-height: 41px;
    margin: 13px auto 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.support-modal__action svg {
    width: 17px;
    height: 17px;
}

.support-modal__action--gold {
    border: 1px solid #7b4e11;
    background: linear-gradient(180deg, #e39f27 0%, #b46b0f 100%);
    color: #f7e0b6;
    box-shadow:
        inset 0 1px 0 rgba(255, 238, 190, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.3);
}

.support-modal__divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b6f66;
    font-size: 12px;
}

.support-modal__divider::before,
.support-modal__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.support-modal__divider span {
    padding: 0 10px;
}

.support-modal__crypto-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #ead6bf;
    font-size: 14px;
    font-weight: 700;
}

.support-modal__crypto-title svg {
    width: 18px;
    height: 18px;
    color: #d9b16a;
}

.support-modal__crypto-id {
    margin-top: 10px;
    padding: 10px 9px;
    border: 1px solid #3b332f;
    border-radius: 4px;
    background: linear-gradient(180deg, #2b2527 0%, #1d181a 100%);
    color: #f1debe;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.01em;
    word-break: break-all;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.support-modal__action--dark {
    width: calc(100% - 110px);
    border: 1px solid #4b4548;
    background: linear-gradient(180deg, #4e4a4d 0%, #2f2c2f 100%);
    color: #f1eef0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.support-modal__submit-form {
    padding: 10px 14px 0;
}

.support-modal__submit {
    width: 100%;
    min-height: 45px;
    border: 1px solid #8d5c12;
    border-radius: 6px;
    background: linear-gradient(180deg, #efa621 0%, #c9780c 100%);
    color: #f9f2df;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 238, 190, 0.35),
        0 6px 16px rgba(0, 0, 0, 0.28);
}

.support-modal__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.support-modal__close-link {
    display: block;
    width: 100%;
    padding: 12px 14px 16px;
    border: 0;
    background: transparent;
    color: #ece1d7;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.flash {
    margin-bottom: 1px;
    padding: 1px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.flash--success {
    background: rgba(31, 122, 69, 0.2);
    border-color: rgba(31, 122, 69, 0.45);
}

.flash--error {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.45);
}

.flash--info {
    background: rgba(255, 255, 255, 0.05);
}

.flash.is-hidden {
    opacity: 0;
}

.setup-card,
.panel,
.hero-card,
.empty-state {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.setup-card--compact {
    max-width: 560px;
}

.setup-card h2,
.panel h2,
.empty-state h2,
.hero-card h1 {
    color: var(--foreground);
    letter-spacing: 0.05em;
}

.setup-card p,
.panel p,
.empty-state p,
.setup-copy {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.setup-card__actions,
.setup-form,
.site-header__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.site-header__actions {
    margin-left: auto;
    align-items: center;
    justify-content: flex-end;
}

.button--secondary {
    background: var(--muted);
}

.button--primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

.button--primary:hover {
    background: #ef4444;
}

.button--danger {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.55);
    color: #fecaca;
}

.button--danger:hover {
    background: rgba(220, 38, 38, 0.24);
}

.button--small {
    min-height: 34px;
    padding: 0 12px;
}

.page-content--narrow {
    width: min(860px, calc(100vw - 32px));
}

.eyebrow {
    display: inline-flex;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-card {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-card--admin,
.hero-card--page {
    margin-bottom: 18px;
}

.hero-card h1,
.panel h1 {
    margin-top: 10px;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 0.95;
}

.panel__header {
    margin-bottom: 16px;
}

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

.panel__header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-content--admin {
    padding-top: 18px;
    padding-bottom: 28px;
}

.admin-top-banner {
    margin-bottom: 20px;
}

.admin-top-banner__card {
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.15) 0%, transparent 24%),
        linear-gradient(180deg, rgba(48, 48, 48, 0.98) 0%, rgba(31, 31, 31, 0.98) 100%);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

.admin-top-banner h1 {
    margin-top: 8px;
    font-size: clamp(1.9rem, 3.8vw, 3rem);
    line-height: 0.95;
}

.admin-top-banner p {
    max-width: 700px;
    margin: 10px 0 0;
    color: var(--muted-foreground);
    font-size: 14px;
    line-height: 1.6;
}

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

.admin-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
}

.admin-sidebar__nav {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.12) 0%, transparent 30%),
        linear-gradient(180deg, rgba(48, 48, 48, 0.98) 0%, rgba(31, 31, 31, 0.98) 100%);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

.admin-sidebar__nav {
    display: grid;
    gap: 14px;
}

.admin-sidebar__nav-title {
    color: #f2d5d1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.admin-sidebar__track {
    display: grid;
    gap: 14px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-sidebar__track::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.admin-sidebar__group {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.24s ease, background-color 0.24s ease, box-shadow 0.24s ease;
}

.admin-sidebar__group.is-current {
    border-color: rgba(255, 126, 106, 0.35);
    background: rgba(220, 38, 38, 0.06);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.admin-sidebar__group-title {
    margin: 0 0 12px;
    color: #f2e8e4;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-sidebar__group-links {
    position: relative;
    display: grid;
    gap: 10px;
    padding-left: 12px;
}

.admin-sidebar__group-links::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 138, 120, 0.8) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.admin-sidebar__link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 16px 0 52px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: #ece1db;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease, color 0.24s ease;
}

.admin-sidebar__link::before,
.admin-sidebar__link::after {
    content: "";
    position: absolute;
    top: 50%;
    border-radius: 999px;
    transform: translateY(-50%);
}

.admin-sidebar__link::before {
    left: 8px;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.admin-sidebar__link::after {
    left: 14px;
    width: 8px;
    height: 8px;
    background: #ff7c6a;
    opacity: 0.58;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.admin-sidebar__link:hover {
    border-color: rgba(220, 38, 38, 0.42);
    background: rgba(220, 38, 38, 0.12);
    color: #ffffff;
    transform: translateX(6px);
}

.admin-sidebar__link.is-active {
    border-color: rgba(255, 126, 106, 0.48);
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.2) 0%, rgba(220, 38, 38, 0.08) 100%);
    color: #ffffff;
    transform: translateX(12px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.admin-sidebar__link.is-active::before {
    border-color: rgba(255, 126, 106, 0.7);
    background: rgba(255, 126, 106, 0.18);
    box-shadow: 0 0 0 5px rgba(255, 126, 106, 0.08);
}

.admin-sidebar__link.is-active::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.18);
}

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

.admin-content-stack {
    display: grid;
    gap: 20px;
}

.admin-section-card {
    scroll-margin-top: 110px;
}

.admin-section-copy {
    margin: 0;
    color: var(--muted-foreground);
    line-height: 1.7;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.admin-auth-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 160px);
}

.admin-auth-card {
    width: min(520px, 100%);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.16) 0%, transparent 28%),
        linear-gradient(180deg, rgba(45, 45, 45, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
}

.admin-auth-card h1 {
    margin-top: 12px;
    font-size: clamp(2.5rem, 5vw, 3.4rem);
    line-height: 0.95;
}

.admin-auth-card p {
    margin: 10px 0 0;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.admin-form--auth {
    margin-top: 22px;
}

.admin-form__actions,
.admin-inline-form,
.admin-list__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-inline-form {
    margin: 0;
}

.admin-stat-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(52, 52, 52, 0.98) 0%, rgba(36, 36, 36, 0.98) 100%);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2);
}

.admin-stat-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 600;
}

.admin-stat-card strong {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    line-height: 1;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.12);
    color: #f7d4d4;
    font-size: 13px;
    font-weight: 600;
}

label {
    display: grid;
    gap: 8px;
}

label span {
    font-size: 14px;
    font-weight: 600;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.admin-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--muted);
}

.admin-list__item--stacked {
    align-items: flex-start;
}

.admin-list__content {
    flex: 1;
    min-width: 0;
}

.admin-list__item strong {
    display: block;
    margin-bottom: 4px;
}

.admin-list__item p,
.setup-meta,
.result-list__item {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 14px;
    line-height: 1.5;
}

.setup-meta,
.result-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.result-list__item {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--muted);
}

.page-content--setup {
    padding-top: 22px;
    padding-bottom: 32px;
}

.panel--setup-wizard {
    display: grid;
    gap: 22px;
}

.wizard-stage-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.wizard-stage-strip__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.wizard-stage-strip__item.is-active {
    border-color: rgba(255, 126, 106, 0.48);
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.22) 0%, rgba(134, 29, 29, 0.16) 100%);
    color: #ffffff;
}

.wizard-stage-strip__item.is-complete {
    border-color: rgba(31, 122, 69, 0.42);
    background: rgba(31, 122, 69, 0.12);
    color: #d7f3e2;
}

.wizard-meta-grid,
.wizard-form__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.wizard-meta-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(52, 52, 52, 0.95) 0%, rgba(34, 34, 34, 0.98) 100%);
}

.wizard-meta-card__label {
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wizard-meta-card strong {
    font-size: 1.1rem;
    color: var(--foreground);
}

.wizard-meta-card p {
    margin: 0;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.wizard-section {
    display: grid;
    gap: 18px;
}

.wizard-section__header {
    display: grid;
    gap: 8px;
}

.wizard-checklist,
.installer-step-list {
    display: grid;
    gap: 12px;
}

.wizard-checklist__item,
.installer-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.wizard-checklist__item.is-success,
.installer-step.is-success {
    border-color: rgba(31, 122, 69, 0.42);
    background: rgba(31, 122, 69, 0.1);
}

.wizard-checklist__item.is-error,
.installer-step.is-error {
    border-color: rgba(220, 38, 38, 0.42);
    background: rgba(220, 38, 38, 0.12);
}

.installer-step.is-running {
    border-color: rgba(255, 126, 106, 0.48);
    background: rgba(220, 38, 38, 0.08);
}

.wizard-checklist__status,
.installer-step__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--foreground);
    font-size: 12px;
    font-weight: 800;
}

.wizard-checklist__item.is-success .wizard-checklist__status,
.installer-step.is-success .installer-step__badge {
    background: rgba(31, 122, 69, 0.22);
    color: #dff9ea;
}

.wizard-checklist__item.is-error .wizard-checklist__status,
.installer-step.is-error .installer-step__badge {
    background: rgba(220, 38, 38, 0.24);
    color: #ffd7d7;
}

.installer-step.is-running .installer-step__badge {
    background: rgba(255, 126, 106, 0.24);
    color: #fff3ef;
}

.wizard-checklist__content,
.installer-step__content {
    display: grid;
    gap: 6px;
}

.wizard-checklist__content strong,
.installer-step__content strong,
.wizard-success strong {
    font-size: 15px;
    color: var(--foreground);
}

.wizard-checklist__content p,
.installer-step__content p,
.wizard-success p {
    margin: 0;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.installer-progress {
    display: grid;
    gap: 16px;
}

.installer-progress__bar {
    position: relative;
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.installer-progress__bar-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff8b77 0%, #dc2626 100%);
    transition: width 0.28s ease;
}

.installer-progress__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.installer-progress__summary strong {
    color: var(--foreground);
    font-size: 16px;
}

.installer-progress__summary span {
    color: var(--muted-foreground);
    font-size: 13px;
}

.installer-log {
    margin-bottom: 0;
}

.installer-log__item--success {
    border-color: rgba(31, 122, 69, 0.42);
    background: rgba(31, 122, 69, 0.1);
}

.installer-log__item--error {
    border-color: rgba(220, 38, 38, 0.42);
    background: rgba(220, 38, 38, 0.14);
}

.wizard-success {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(31, 122, 69, 0.45);
    border-radius: 14px;
    background: rgba(31, 122, 69, 0.12);
}

.button[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.5;
}

.page-copy {
    color: var(--secondary-foreground);
    font-size: 15px;
    line-height: 1.9;
}

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

.admin-settings-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(52, 52, 52, 0.98) 0%, rgba(35, 35, 35, 0.98) 100%);
}

.admin-settings-card__title {
    font-size: 1.4rem;
}

.admin-brand-preview {
    display: grid;
    gap: 10px;
}

.admin-brand-preview__label {
    font-size: 14px;
    font-weight: 700;
    color: var(--foreground);
}

.admin-brand-preview__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.admin-brand-preview__frame--brand,
.admin-brand-preview__frame--home {
    justify-content: flex-start;
}

.admin-brand-preview__frame img {
    display: block;
    max-width: 100%;
    max-height: 54px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.admin-brand-preview__fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-brand-preview__brand .brand__mark {
    width: 42px;
    height: 42px;
    font-size: 15px;
    border-radius: 12px;
}

.admin-brand-preview__brand .brand__text {
    font-size: 26px;
    letter-spacing: 0.04em;
}

.admin-brand-preview__home-brand {
    pointer-events: none;
    font-size: 26px;
}

.admin-brand-preview__home-brand .brand-panel__logo-image {
    height: 34px;
    max-width: 140px;
}

.admin-field-hint {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 13px;
    line-height: 1.6;
}

.admin-field-hint a {
    color: #ffb6aa;
    text-decoration: underline;
    text-decoration-color: rgba(255, 182, 170, 0.55);
}

.admin-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 126, 106, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #f4dfd9;
    font-size: 13px;
    font-weight: 600;
}

.media-import-chooser {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.14) 0%, transparent 26%),
        linear-gradient(180deg, rgba(45, 45, 45, 0.98) 0%, rgba(31, 31, 31, 0.98) 100%);
}

.media-import-chooser__header {
    display: grid;
    gap: 6px;
}

.media-import-chooser__header h3 {
    font-size: 1.8rem;
}

.media-import-chooser__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.media-import-chooser__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: #efe2dc;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.media-import-chooser__tab:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 126, 106, 0.35);
    color: #ffffff;
}

.media-import-chooser__tab.is-active {
    border-color: rgba(255, 126, 106, 0.55);
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.24) 0%, rgba(151, 35, 28, 0.16) 100%);
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.media-import-chooser__panels {
    display: grid;
    gap: 10px;
}

.media-import-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.media-import-panel[hidden] {
    display: none;
}

.media-import-panel .panel__header {
    margin-bottom: 0;
}

.media-import-panel h4 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--foreground);
}

.external-source-tool {
    display: grid;
    gap: 12px;
}

.external-source-tool__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.external-source-tool__controls--split {
    grid-template-columns: 140px minmax(0, 1fr) auto;
}

.external-source-tool__controls input[type="text"],
.external-source-tool__controls select {
    min-height: 42px;
}

.external-source-status {
    margin: 0;
}

.external-source-results {
    display: grid;
    gap: 12px;
}

.external-source-result {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.external-source-result__thumb {
    display: grid;
    place-items: center;
    overflow: hidden;
    min-height: 84px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--muted-foreground);
}

.external-source-result__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.external-source-result__thumb span {
    padding: 10px;
    text-align: center;
    font-size: 12px;
}

.external-source-result__content {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.external-source-result__content strong {
    font-size: 15px;
    color: var(--foreground);
}

.external-source-result__meta,
.external-source-result__summary {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 13px;
    line-height: 1.5;
}

.external-source-result__summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.external-source-result__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.external-source-result__badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.external-source-result__badge.is-ready {
    background: rgba(31, 122, 69, 0.16);
    color: #d5f5e3;
}

.external-source-result__badge.is-warning {
    background: rgba(255, 180, 59, 0.14);
    color: #ffe6bf;
}

.auth-page {
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.12) 0%, transparent 24%),
        linear-gradient(180deg, #262222 0%, #1e1e1e 100%);
}

.auth-page__content {
    display: grid;
    place-items: center;
    padding-top: 42px;
    padding-bottom: 56px;
}

.auth-card-wrap {
    width: 100%;
    display: grid;
    place-items: center;
}

.form-container {
    width: min(650px, 100%);
    border: 1px solid var(--border);
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.15) 0%, transparent 24%),
        linear-gradient(180deg, rgba(47, 47, 47, 0.98) 0%, rgba(33, 33, 33, 0.98) 100%);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
    border-radius: 24px;
    box-sizing: border-box;
    padding: 38px 38px 34px;
    color: var(--foreground);
}

.form-container .auth-card__eyebrow {
    display: inline-flex;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.form-container .title {
    text-align: left;
    font-family: 'Bebas Neue', sans-serif;
    margin: 14px 0 0;
    font-size: clamp(2rem, 0vw, 5.6rem);
    line-height: 0.9;
    letter-spacing: 0.01em;
    color: var(--foreground);
}

.form-container .sub-title {
    margin: 22px 0 0;
    max-width: 560px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted-foreground);
    font-family: 'Inter', sans-serif;
}

.form-container .form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 28px 0 18px;
}

.form-container .auth-field {
    display: grid;
    gap: 10px;
}

.form-container .auth-field span {
    font-size: 14px;
    font-weight: 700;
    color: var(--foreground);
}

.form-container .input {
    width: 100%;
    min-height: 52px;
    border-radius: 8px;
    border: 1px solid #444444;
    outline: 0;
    box-sizing: border-box;
    padding: 0 16px;
    background: #2b2b2b;
    color: var(--foreground);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.form-container .input:focus {
    border-color: rgba(255, 126, 106, 0.5);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-container .input::placeholder {
    color: #8d8d8d;
}

.form-container .form-btn {
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid #cf3b32;
    background: #d13a30;
    color: #ffffff;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.form-container .form-btn:hover {
    background: #de4438;
    border-color: #de4438;
}

.form-container .form-btn:active {
    transform: translateY(1px);
}

.form-container .sign-up-label {
    margin: 0;
    font-size: 13px;
    color: var(--muted-foreground);
    font-family: 'Inter', sans-serif;
}

.form-container .sign-up-link {
    margin-left: 6px;
    font-size: 13px;
    text-decoration: underline;
    text-decoration-color: rgba(255, 126, 106, 0.8);
    color: #f3d6d2;
    cursor: pointer;
    font-weight: 700;
}

.form-container .buttons-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: 22px;
    gap: 14px;
}

.form-container .apple-login-button,
.form-container .google-login-button {
    min-height: 54px;
    border-radius: 999px;
    box-sizing: border-box;
    width: 100%;
    padding: 0 22px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande", "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    gap: 9px;
    border: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.form-container .apple-login-button {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}

.form-container .apple-login-button:hover,
.form-container .google-login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.form-container .google-login-button {
    background: #ffffff;
    color: #1f1f1f;
    border: 2px solid #8a8a8a;
}

.form-container .apple-login-button.is-disabled,
.form-container .google-login-button.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.form-container .apple-login-button span,
.form-container .google-login-button span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.form-container .apple-icon,
.form-container .google-icon {
    flex-shrink: 0;
    font-size: 19px;
    margin-bottom: 0;
}

.form-container .apple-icon {
    font-size: 17px;
}

.form-container .apple-login-button.is-disabled,
.form-container .google-login-button.is-disabled {
    color: inherit;
}

.footer-nav__link.is-active {
    color: #efe0d7;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .video-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-settings-grid {
        grid-template-columns: 1fr;
    }

    .wizard-meta-grid,
    .wizard-form__grid {
        grid-template-columns: 1fr;
    }

    .external-source-tool__controls,
    .external-source-tool__controls--split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .app-container,
    .site-header__inner,
    .page-content,
    .page-content--narrow {
        width: min(100vw - 20px, 1440px);
    }

    .app-header__inner,
    .site-header__inner {
        position: relative;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 8px 0 10px;
    }

    .brand-panel {
        display: grid;
        grid-template-columns: minmax(0, auto) 1fr auto;
        align-items: center;
        min-width: 0;
        width: 100%;
        padding: 7px 12px 7px 12px;
    }

    .brand-panel__logo {
        min-width: 0;
        font-size: 15px;
    }

    .brand-panel__mobile-auth-row {
        display: inline-flex;
        justify-self: center;
        gap: 6px;
    }

    .brand-panel__mobile-auth-row .app-header__auth-link {
        min-height: 28px;
        padding: 0 10px;
        font-size: 11px;
    }

    .header-nav-wrap {
        width: 100%;
        justify-content: stretch;
    }

    .app-header__auth {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
    }

    .app-header__auth--guest {
        display: none !important;
        width: 0;
        height: 0;
        margin: 0;
        overflow: hidden;
    }

    .top-tabs {
        width: 100%;
        max-width: 100%;
        overflow-x: visible;
        padding: 3px 6px;
        border-color: #5d2f2b;
        justify-content: flex-start;
    }

    .top-tabs__link,
    .top-tabs__support {
        min-height: 27px;
        font-size: 12px;
        padding: 0 10px;
    }

    .top-tabs__link.is-active::after {
        left: 10px;
        right: 10px;
        bottom: -5px;
        height: 2px;
    }

    .top-tabs__icon--home {
        display: inline-block;
        width: 12px;
        height: 12px;
    }

    .top-tabs__support {
        margin-left: auto;
        padding: 0 10px;
        border-radius: 5px;
    }

    .support-modal {
        padding: 8px;
    }

    .support-modal__dialog {
        width: min(365px, calc(100vw - 16px));
        max-height: calc(100vh - 16px);
        overflow-y: auto;
    }

    .support-modal__action {
        width: calc(100% - 92px);
    }

    .support-modal__action--dark {
        width: calc(100% - 100px);
    }

    .brand-panel__logo {
        font-size: 17px;
    }

    .brand-panel__actions {
        gap: 10px;
    }

    .brand-panel__icon-button {
        width: 30px;
        height: 27px;
    }

    .media-import-chooser {
        padding: 14px;
        border-radius: 14px;
    }

    .media-import-chooser__tabs {
        flex-direction: column;
    }

    .media-import-chooser__tab {
        width: 100%;
    }

    .media-import-panel {
        padding: 14px;
    }

    .external-source-result {
        grid-template-columns: 1fr;
    }

    .external-source-result__thumb {
        min-height: 160px;
    }

    .comment-item__meta,
    .admin-list__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-auth-card {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .form-container {
        padding: 26px 18px 22px;
        border-radius: 18px;
    }

    .form-container .title {
        font-size: clamp(1rem, 10vw, 4.1rem);
    }

    .form-container .sub-title {
        font-size: 15px;
    }

    .panel__header--split {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-sidebar__nav {
        padding: 18px;
        border-radius: 14px;
    }

    .admin-top-banner {
    }

    .admin-top-banner__card {
        padding: 14px 16px;
        border-radius: 14px;
    }

    .admin-top-banner h1 {
        font-size: clamp(1.7rem, 8vw, 2.3rem);
    }

    .admin-sidebar__track {
        grid-auto-flow: column;
        grid-auto-columns: minmax(240px, 1fr);
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        padding: 2px 2px 10px 2px;
    }

    .admin-sidebar__group {
        min-width: 240px;
    }

    .admin-sidebar__group-links {
        padding-left: 0;
    }

    .admin-sidebar__group-links::before {
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 0;
        width: auto;
        height: 2px;
    }

    .admin-sidebar__link {
        min-height: 50px;
        padding: 0 16px 0 46px;
    }

    .admin-sidebar__link:hover,
    .admin-sidebar__link.is-active {
        transform: translateY(-2px);
    }

    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wizard-stage-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wizard-checklist__item,
    .installer-step {
        grid-template-columns: 1fr;
    }

    .wizard-checklist__status,
    .installer-step__badge {
        min-width: 0;
        width: fit-content;
    }

    .app-footer__inner {
        padding: 7px 0 9px;
    }

    .app-footer {
        margin-top: 10px;
        border-top-color: #3b2525;
        background:
            linear-gradient(180deg, rgba(56, 21, 21, 0.22) 0%, rgba(20, 12, 12, 0.98) 44%, rgba(14, 10, 10, 1) 100%);
    }

    .footer-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0;
    }

    .footer-nav__link {
        flex: 0 0 auto;
        min-height: 18px;
        padding: 0 10px;
        font-size: 11px;
        font-weight: 400;
        color: #8a7a76;
        white-space: nowrap;
    }

    .footer-nav__link:hover {
        color: #bdaea9;
    }

    .footer-nav__link + .footer-nav__link::before {
        height: 10px;
        background: rgba(255, 255, 255, 0.08);
    }
}
