/* ═══════════════════════════════════════════════════════════════════════════
   style.css v26.0 — Премиальный графитовый минимализм
   Полный оверрайд Bootstrap 5 — никакого синего и серого Bootstrap
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Base ──────────────────────────────────────────────────────────────── */
body {
    background-color: #0F1115 !important;
    color: #e4e7eb !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* ═══════════════════════════════════════════════════════════════════════════
   HEADERS — премиальный glass-эффект, единый для всех шапок
   ═══════════════════════════════════════════════════════════════════════════ */
.navbar,
#cinema-header,
#dashboard-header,
#site-header,
header[id$="-header"],
header[id$="-header"].navbar {
    background: rgba(15, 17, 21, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    z-index: 10;
}

.navbar .navbar-brand {
    color: #e4e7eb !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
}

/* ── Header titles ─────────────────────────────────────────────────────── */
#header-title,
#site-header-title,
#cinema-header-title,
.navbar-brand {
    color: #e4e7eb !important;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   КОНТЕЙНЕРЫ — отступ от фиксированной шапки
   ═══════════════════════════════════════════════════════════════════════════ */
body:not(.cinema-mode) #gallery-container {
    margin-top: 80px !important;
}
#dashboard-view {
    margin-top: 60px;
}
main {
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════════════════
   КНОПКИ — монохромные, абсолютно без синевы Bootstrap
   ═══════════════════════════════════════════════════════════════════════════ */
.btn-outline-light {
    color: #9ca3af !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
}
.btn-outline-light:hover {
    color: #e4e7eb !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.btn-outline-secondary {
    color: #6b7280 !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    background: transparent !important;
}
.btn-outline-secondary:hover {
    color: #e4e7eb !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e4e7eb !important;
}
.btn-primary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.btn-outline-primary {
    color: #9ca3af !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    color: #e4e7eb !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.btn-outline-success {
    color: #9ca3af !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
}
.btn-outline-success:hover {
    color: #4ade80 !important;
    background: rgba(74, 222, 128, 0.06) !important;
    border-color: rgba(74, 222, 128, 0.2) !important;
}

.btn-outline-danger {
    color: #9ca3af !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
}
.btn-outline-danger:hover {
    color: #ff2d55 !important;
    background: rgba(255, 45, 85, 0.06) !important;
    border-color: rgba(255, 45, 85, 0.2) !important;
}

.btn-dark {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: #9ca3af !important;
}
.btn-dark:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #e4e7eb !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ВКЛАДКИ (Tab Bar) — монохром, активный = белый + красное подчёркивание
   ═══════════════════════════════════════════════════════════════════════════ */
.tab-btn {
    background: transparent !important;
    border: none !important;
    color: #6b7280 !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    transition: color 0.2s, border-color 0.2s !important;
    white-space: nowrap;
    cursor: pointer;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}
.tab-btn:hover {
    color: #9ca3af !important;
    background: transparent !important;
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}
.tab-btn.active,
.tab-btn[class*="active"] {
    color: #ffffff !important;
    border-bottom-color: #ff2d55 !important;
    background: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS — премиальные тёмные карточки
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
    background: #1A1D24 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
    border-radius: 0.75rem !important;
}
.card.bg-dark {
    background: #1A1D24 !important;
}
.card.border-secondary {
    border-color: rgba(255, 255, 255, 0.05) !important;
}
.card-header,
.card-footer {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.card .card-img-top {
    transition: transform 0.4s ease;
}
.card:hover .card-img-top {
    transform: scale(1.03);
}
.card:hover {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BADGE
   ═══════════════════════════════════════════════════════════════════════════ */
.badge.bg-secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #9ca3af !important;
}
.badge.bg-primary {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #e4e7eb !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SMART FAB — графитовый минимализм
   ═══════════════════════════════════════════════════════════════════════════ */
#smart-fab {
    background: #1A1D24 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    color: #ffffff !important;
}
#smart-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 32px rgba(255, 45, 85, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 45, 85, 0.3) !important;
}
#smart-fab:active {
    transform: scale(0.92);
}
#fab-count {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: #ffffff !important;
    position: relative;
    z-index: 2;
}
#smart-fab .fab-heart-icon {
    color: #ff2d55 !important;
    fill: #ff2d55 !important;
    stroke: #ff2d55 !important;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 6px rgba(255, 45, 85, 0.5));
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM CONTROLS — тёмные, без синей каймы
   ═══════════════════════════════════════════════════════════════════════════ */
.form-control {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #e4e7eb !important;
}
.form-control:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
}
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
    MODAL OVERRIDES
    ═══════════════════════════════════════════════════════════════════════════ */
.modal-content {
    background: #0F1115 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
.modal-footer {
    border-top-color: rgba(255, 255, 255, 0.06) !important;
}
.btn-close {
    filter: invert(0.6) !important;
}

/* ── Upload Modal — контрастная рамка и глубокая тень ── */
#upload-modal .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8) !important;
}

/* ── Modal Backdrop — усиленное затемнение ── */
.modal-backdrop.show {
    opacity: 0.75 !important;
}

/* ── Upload Button — прогресс-бар внутри кнопки ── */
#upload-start-btn {
    position: relative;
    overflow: hidden;
}
#upload-btn-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 45, 85, 0.35);
    transition: width 0.3s ease;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
}
#upload-start-btn #upload-btn-text {
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
    OFFCAVANS (мобильное меню)
    ═══════════════════════════════════════════════════════════════════════════ */
.offcanvas {
    background: #0F1115 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.offcanvas-body {
    color: #e4e7eb;
}

/* ═══════════════════════════════════════════════════════════════════════════
    LIGHTBOX HEART — неоновый красный при выборе
    ═══════════════════════════════════════════════════════════════════════════ */
#modal-heart-btn {
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
    cursor: pointer;
    color: #ffffff;
}
#modal-heart-btn .heart-icon {
    transition: fill 0.1s, stroke 0.1s, transform 0.1s !important;
    width: 22px;
    height: 22px;
    fill: none !important;
    stroke: #ffffff !important;
    stroke-width: 2px;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.85));
}
#modal-heart-btn.selected .heart-icon {
    fill: #ff2d55 !important;
    stroke: #ff2d55 !important;
    filter: drop-shadow(0 0 8px rgba(255, 45, 85, 0.6));
}
#modal-heart-btn.burst {
    animation: heartBurst 0.4s ease;
}

/* ── Heart icon (grid cards) ────────────────────────────────────────────── */
.heart-icon {
    transition: fill 0.15s, stroke 0.15s, transform 0.15s !important;
}
.heart-icon.heart-icon-filled {
    fill: #ff2d55 !important;
    stroke: #ff2d55 !important;
    transform: scale(1.15) !important;
    filter: drop-shadow(0 0 6px rgba(255, 45, 85, 0.5));
}
.heart-icon.burst {
    animation: heartBeat 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}
.heart-icon.unburst {
    animation: heartUnBurst 0.35s ease-in-out;
    will-change: transform, opacity;
}

/* ═══════════════════════════════════════════════════════════════════════════
    MODAL COUNTER — глобальный счётчик лайков
    ═══════════════════════════════════════════════════════════════════════════ */
#modal-counter {
    font-family: 'Inter', 'SF Mono', monospace !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════════════════
    HR / DIVIDER
    ═══════════════════════════════════════════════════════════════════════════ */
hr, .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
    KEYFRAMES
    ═══════════════════════════════════════════════════════════════════════════ */
@keyframes heartBeat {
    0%   { transform: scale(1) rotate(0deg); }
    15%  { transform: scale(1.35) rotate(-8deg); }
    30%  { transform: scale(1) rotate(4deg); }
    45%  { transform: scale(1.15) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes heartUnBurst {
    0%   { transform: scale(1); opacity: 1; }
    40%  { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes heartBurst {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.6); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes heartBurstMobile {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}
@keyframes skeletonPulse {
    0%   { opacity: 0.3; }
    50%  { opacity: 0.7; }
    100% { opacity: 0.3; }
}
@keyframes cinemaSkeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes photoFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes photoFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes galleryCardFadeIn {
    0%   { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes progressPulse {
    0% { width: 20%; opacity: 0.6; }
    50% { width: 60%; opacity: 1; }
    100% { width: 20%; opacity: 0.6; }
}
@keyframes heroBreathing {
    0%, 100% { opacity: 0.35; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.75; transform: translateX(-50%) translateY(5px); }
}
@keyframes badgePopIn {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}
@keyframes fabElasticIn {
    0%   { transform: translateY(120px) scale(0.3); opacity: 0; }
    50%  { transform: translateY(-15px) scale(1.1); opacity: 1; }
    70%  { transform: translateY(5px) scale(0.95); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes countPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════════
    FLYING HEARTS
    ═══════════════════════════════════════════════════════════════════════════ */
.flying-heart {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    will-change: transform, opacity;
}

/* ═══════════════════════════════════════════════════════════════════════════
    PHOTO CARDS (grid)
    ═══════════════════════════════════════════════════════════════════════════ */
.photo-card img.loaded {
    animation: photoFadeIn 0.3s ease-out both;
}
.photo-card img.skeleton-loading { opacity: 0; }
.photo-card .skeleton-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #1A1A1A 25%, #374151 50%, #1A1A1A 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
}

/* ── Dashboard gallery card: per-section rows ───────────────────────────── */
.gallery-sections-list {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.35rem;
}
.gallery-section-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.gallery-section-row:last-child {
    border-bottom: none;
}
.gallery-section-name {
    min-width: 4rem;
    max-width: 42%;
}

/* ═══════════════════════════════════════════════════════════════════════════
    CINEMATIC MASONRY
    ═══════════════════════════════════════════════════════════════════════════ */
.section-grid-masonry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 0;
    margin: 0;
}
.section-grid-masonry .photo-card {
    display: block;
    width: 100%;
    margin-bottom: 0;
    border-radius: 0;
    background: #14161a;
    box-shadow: none;
    border: none;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}
.section-grid-masonry .photo-card .cinema-skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        #1a1a1a 8%,
        #2d3238 18%,
        #3a4249 28%,
        #2d3238 38%,
        #1a1a1a 48%
    );
    background-size: 200% 100%;
    animation: cinemaSkeletonShimmer 1.8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}
/* Fallback-заглушка для карточек, чья миниатюра так и не загрузилась */
.img-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #17191d 0%, #1f2329 100%);
    color: rgba(255, 255, 255, 0.28);
    font-size: 1.75rem;
    line-height: 1;
    z-index: 3;
    pointer-events: none;
    user-select: none;
}

.cinema-feed img {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}
.cinema-feed img.loaded {
    opacity: 1;
}
.section-grid-masonry .photo-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease, opacity 0.4s ease-in-out;
}
.section-grid-masonry .photo-card:hover img.loaded {
    transform: scale(1.02);
}
.section-grid-masonry .photo-card.selected img.loaded {
    opacity: 0.5;
}
.cinema-section-heading {
    padding: 1.25rem 1rem 0.75rem;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cinema-section-heading-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
}
.cinema-section-heading-meta {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.cinema-section-heading-meta .cinema-heading-selected {
    color: #ff2d55;
    text-transform: none;
    letter-spacing: 0;
}
body.cinema-lens-active #hero-section {
    display: none !important;
}
body.cinema-lens-active main {
    margin-top: 56px !important;
}
/* Сердечко на карточке cinematic — всегда видно, в правом нижнем углу */
.cinema-feed .photo-card-heart {
    bottom: 6px !important;
    right: 6px !important;
    top: auto !important;
    left: auto !important;
    z-index: 25 !important;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: transform 0.15s ease, background 0.15s ease;
}
.cinema-feed .photo-card-heart:active {
    transform: scale(0.92);
}
.cinema-feed .photo-card-heart.heart-pulse {
    animation: heartPulse 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes heartPulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.45); }
    100% { transform: scale(1); }
}
.cinema-feed .photo-card-heart .heart-icon {
    width: 20px !important;
    height: 20px !important;
    opacity: 1 !important;
    visibility: visible !important;
    stroke: #ffffff !important;
    fill: none !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9));
    pointer-events: none;
}
.cinema-feed .photo-card-heart.is-liked,
.cinema-feed .photo-card.selected .photo-card-heart {
    background: rgba(255, 45, 85, 0.25) !important;
    box-shadow: 0 0 12px rgba(255, 45, 85, 0.55);
}
.cinema-feed .photo-card-heart.is-liked .heart-icon,
.cinema-feed .photo-card.selected .photo-card-heart .heart-icon {
    fill: #ff2d55 !important;
    stroke: #ff2d55 !important;
    filter: drop-shadow(0 0 8px rgba(255, 45, 85, 0.75));
}
.cinema-feed.cinema-lens-tab .section-divider {
    display: none !important;
}
/* В режиме вкладки объектива — только одна секция (не полагаться на inline style) */
.cinema-feed.cinema-lens-tab > .section-grid-masonry {
    display: none !important;
}
.cinema-feed.cinema-lens-tab > .section-grid-masonry.cinema-section-visible {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 4px;
}
@media (max-width: 640px) {
    .section-grid-masonry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px;
    }
    .cinema-feed.cinema-lens-tab .section-grid-masonry.cinema-section-visible {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px;
    }
}
@media (min-width: 1024px) {
    .section-grid-masonry {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .cinema-feed.cinema-lens-tab .section-grid-masonry.cinema-section-visible {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (min-width: 1400px) {
    .section-grid-masonry {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .cinema-feed.cinema-lens-tab .section-grid-masonry.cinema-section-visible {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
    PAGE PRELOADER (первый заход на shared / cinematic)
    ═══════════════════════════════════════════════════════════════════════════ */
.page-preloader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    background: #0a0c10;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.page-preloader--hidden,
.page-preloader.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}
body.page-preloader-active {
    overflow: hidden;
    background: #0a0c10 !important;
}
.preloader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: #ff2d55;
    border-radius: 50%;
    animation: preloaderSpin 0.85s linear infinite;
}
.preloader-text {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.04em;
    text-align: center;
    max-width: 280px;
    padding: 0 1rem;
}
@keyframes preloaderSpin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
    HERO SECTION
    ═══════════════════════════════════════════════════════════════════════════ */
#hero-section {
    z-index: 5;
}
#hero-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-section .hero-bg,
.hero-section .hero-overlay,
.hero-section .hero-content,
.hero-section .hero-scroll,
.hero-section .hero-title { pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════════════════
    UI STATES (JS-управляемые)
    ═══════════════════════════════════════════════════════════════════════════ */
.ui-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease;
}
.dashboard-header-hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.cinema-mode {
    background: #000000;
    overflow-y: auto;
}
body.cinema-mode .dashboard-header { display: none !important; }
body.cinema-mode #gallery-header { display: none; }
body.cinema-mode #gallery-container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}
body.cinema-mode main {
    padding-top: 0;
    min-height: 100vh;
}
body:not(.cinema-mode) #hero-section { display: none !important; }
body:not(.cinema-mode) .cinema-header { display: none !important; }

/* ── Misc ──────────────────────────────────────────────────────────────── */
.modal-content img.faded { opacity: 0.6; }
.toast.visible {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}
.count-pulse { animation: countPulse 0.3s ease-out; }
.has-action-bar { padding-bottom: 80px; }
.section-scroll-sentinel { height: 1px; }
.tab-bar.hidden-scroll {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out;
}
.tab-bar-scroll::-webkit-scrollbar {
    display: none;
}
.tab-bar-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
    RESPONSIVE MOBILE OVERRIDES
    ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .flying-heart {
        width: 35px !important;
        height: 35px !important;
        filter: drop-shadow(0 0 8px rgba(255, 45, 85, 0.8)) !important;
        z-index: 10000;
    }
    .flying-heart svg {
        fill: #ff2d55 !important;
        stroke: #ff2d55 !important;
        stroke-width: 1.5px !important;
    }
    #modal-heart-btn {
        right: 20px !important;
        bottom: 80px !important;
        width: 60px !important;
        height: 60px !important;
        background: rgba(15, 23, 42, 0.9) !important;
        border: 2px solid rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }
    #modal-heart-btn .heart-icon {
        width: 30px !important;
        height: 30px !important;
        fill: none !important;
        stroke: #ffffff !important;
        filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.9)) !important;
    }
    #modal-heart-btn.burst {
        animation: heartBurstMobile 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }
    #modal-heart-btn:active {
        transform: scale(0.85) !important;
        transition: transform 0.1s ease !important;
    }
    #modal-overlay {
        background: rgba(10, 15, 25, 1) !important;
        backdrop-filter: none !important;
    }
    .modal-dialog #modal-image {
        image-rendering: -webkit-optimize-contrast;
        transform: translateZ(0);
        will-change: transform, opacity;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        perspective: 1000;
    }
}

/* ── Photo card selection badge override ─────────────────────────────────── */
.gallery-selection-badge[data-section] {
    background: rgba(255, 45, 85, 0.15) !important;
    border: 1px solid rgba(255, 45, 85, 0.2) !important;
    color: #ff2d55 !important;
}

/* ── Dashboard header glass ──────────────────────────────────────────────── */
#dashboard-header,
#site-header,
#cinema-header {
    min-height: 52px;
}

/* ── Cinema header nav links ────────────────────────────────────────────── */
#cinema-header-nav a {
    color: rgba(255, 255, 255, 0.5) !important;
    text-decoration: none !important;
    font-size: 0.8125rem !important;
    transition: color 0.2s;
}
#cinema-header-nav a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}
#cinema-header-nav a.active {
    color: #ffffff !important;
    font-weight: 600 !important;
}
#cinema-header-nav .cinema-nav-meta {
    opacity: 0.55;
    font-size: 0.6875rem;
    font-weight: 500;
    margin-left: 2px;
    white-space: nowrap;
}
#cinema-header-nav a.active .cinema-nav-meta {
    opacity: 0.85;
}

/* ── Кнопка «Выборка завершена» (только shared / portfolio) ─────────────── */
.cinema-header-toolbar {
    min-width: 0;
}
.cinema-complete-btn {
    flex-shrink: 0;
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ff2d55 0%, #e11d48 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 0 20px rgba(255, 45, 85, 0.45), 0 2px 8px rgba(0, 0, 0, 0.35) !important;
    padding: 0.35rem 0.75rem !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease !important;
}
.cinema-complete-btn:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 0 28px rgba(255, 45, 85, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
}
.cinema-complete-btn:active:not(:disabled) {
    transform: scale(0.98);
}
.cinema-complete-btn--sent,
.cinema-complete-btn:disabled {
    opacity: 0.85;
    cursor: default;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.35) !important;
}
.cinema-complete-btn--progress {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    box-shadow: none !important;
    opacity: 1;
}
@media (max-width: 640px) {
    .cinema-complete-btn {
        font-size: 0.625rem !important;
        padding: 0.3rem 0.5rem !important;
    }
    #cinema-header-selection {
        display: none !important;
    }
}

/* ── Cinema header selection ─────────────────────────────────────────────── */
#cinema-header-selection {
    font-size: 0.75rem !important;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5) !important;
}
#cinema-header-selection-count {
    color: #ff2d55 !important;
    font-weight: 600;
}

/* ── Proofing & Annotations (Lightbox) ───────────────────────────────────── */
#modal-image-wrap {
    max-width: 100%;
}
#annotation-canvas.annotation-canvas {
    border-radius: inherit;
    cursor: crosshair;
    touch-action: none;
    z-index: 2;
}
#annotation-canvas.annotation-canvas.drawing {
    cursor: crosshair;
}
#annotation-toolbar .btn.active {
    background: rgba(59, 130, 246, 0.28) !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
}
#annotation-toolbar .btn:disabled {
    opacity: 0.6;
}

/* Статичный блок текста комментария (View Mode в Lightbox) */
#annotation-comment-display-text.annotation-comment-bubble {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    max-width: 100%;
    margin: 0.5rem auto 0;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8125rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
#annotation-comment-display-text.annotation-comment-bubble:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(59, 130, 246, 0.6);
}

/* Бейдж «есть правка» на карточке фото в сетке/кино-ленте */
.photo-card .annotation-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.7rem;
    line-height: 1;
    pointer-events: auto;
    cursor: help;
}

/* ── Download-all button (delivery mode) ─────────────────────────────── */
.download-all-btn {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
    color: #4ade80;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 5px 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.download-all-btn:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.7) !important;
    color: #86efac;
}
