@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --primary-color: #000000;
    --accent-color: #0f766e;
    --accent-gradient: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
    --accent-soft: rgba(20, 184, 166, 0.12);
    --premium-color: #b7791f;
    --text-primary: #0f0f0f;
    --text-secondary: #606060;
    --danger-color: #dc2626;
    --success-color: #2ec4b6;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 76px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
    --yt-button-hover: rgba(0, 0, 0, 0.05);
    --yt-input-bg: #f1f1f1;
    --yt-card-hover-bg: rgba(0, 0, 0, 0.02);
    --header-bg: #ffffff;
    --border-color: #e5e5e5;
    
    --badge-bg: var(--yt-input-bg);
    --badge-border: var(--border-color);
    --badge-color: var(--text-primary);
    --badge-checked-bg: var(--text-primary);
    --badge-checked-border: var(--text-primary);
    --badge-checked-color: var(--bg-color);

    /* Logo Colors */
    --logo-pin-start: #14b8a6;
    --logo-pin-end: #0f766e;
    --logo-dot-start: #f59e0b;
    --logo-dot-end: #d97706;
}

[data-theme="dark"] {
    --bg-color: #0f0f0f;
    --card-bg: #1f1f1f;
    --card-border: rgba(255, 255, 255, 0.08);
    --primary-color: #ffffff;
    --accent-color: #5eead4;
    --accent-gradient: linear-gradient(135deg, #2dd4bf 0%, #0f766e 100%);
    --accent-soft: rgba(45, 212, 191, 0.16);
    --premium-color: #fbbf24;
    --text-primary: #f1f1f1;
    --text-secondary: #aaa;
    --danger-color: #ff4d4d;
    --success-color: #2ec4b6;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.65);
    --yt-button-hover: rgba(255, 255, 255, 0.1);
    --yt-input-bg: #121212;
    --yt-card-hover-bg: rgba(255, 255, 255, 0.05);
    --header-bg: #0f0f0f;
    --border-color: #303030;

    /* Logo Colors (Dark Mode) */
    --logo-pin-start: #5eead4;
    --logo-pin-end: #14b8a6;
    --logo-dot-start: #fbbf24;
    --logo-dot-end: #f59e0b;
}

/* Reset and Globals */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background-color: var(--bg-color) !important;
    color: var(--text-primary) !important;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

a {
    color: var(--accent-color);
    text-decoration: none !important;
    text-decoration-line: none !important;
}
a:hover,
a:focus,
a:focus-visible {
    text-decoration: none !important;
    text-decoration-line: none !important;
}

/* Base Layout Container */
.app-container {
    display: flex;
    min-height: 100vh;
    padding-top: 64px; /* Space for sticky header */
}

/* YouTube Topbar Header */
.yt-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: color-mix(in srgb, var(--header-bg) 85%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.yt-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.yt-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
}

.yt-logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yt-logo:hover .yt-logo-icon {
    transform: scale(1.15) rotate(-8deg);
}

.yt-logo-text {
    font-family: "Outfit", sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--accent-color);
    letter-spacing: 0;
    line-height: 1;
}

[data-theme="dark"] .yt-logo-text {
    color: var(--text-primary);
    font-weight: 500;
}

.yt-logo-text span {
    color: inherit;
    font-weight: 500;
}

.menu-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle-btn i {
    font-size: 1.75rem !important;
    line-height: 1;
}

.menu-toggle-btn:hover {
    background: var(--yt-button-hover);
}

.yt-header-center {
    flex-grow: 1;
    max-width: 650px;
    margin: 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.yt-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 40px;
    background: var(--yt-input-bg);
    overflow: hidden;
    padding-left: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.yt-search-form:focus-within {
    border-color: var(--accent-color);
    background: var(--bg-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 90%);
}

.yt-search-box {
    flex-grow: 1;
    display: flex;
    align-items: center;
}
.yt-search-box input {
    width: 100%;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    padding: 0 12px;
}

.yt-search-btn {
    height: 38px;
    width: 60px;
    background: var(--yt-button-hover);
    border: none;
    border-left: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yt-search-btn:hover {
    background: rgba(0,0,0,0.06);
}
[data-theme="dark"] .yt-search-btn:hover {
    background: rgba(255,255,255,0.08);
}

.mobile-location-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--yt-input-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mobile-location-btn i {
    font-size: 1.2rem;
    line-height: 1;
}

.mobile-location-btn:hover,
.mobile-location-btn:focus-visible {
    border-color: var(--accent-color);
    background: var(--yt-button-hover);
    outline: none;
}

.mobile-location-btn.is-active {
    border-color: transparent;
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-color), transparent 75%);
}

.mobile-location-btn.is-loading i {
    animation: mobile-location-spin 0.85s linear infinite;
}

@keyframes mobile-location-spin {
    to { transform: rotate(360deg); }
}

.header-city-select-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-select {
    display: none !important;
}

.header-city-select-wrap .select2-container {
    width: 180px !important;
}

/* Premium Select2 Custom Styling for Header Powiat Select */
.header-city-select-wrap .select2-container--bootstrap-5 .select2-selection {
    border-radius: 30px !important;
    height: 38px !important;
    background-color: var(--yt-input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    display: flex !important;
    align-items: center !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.header-city-select-wrap .select2-container--bootstrap-5 .select2-selection:hover {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 90%) !important;
}

.header-city-select-wrap .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    padding-left: 4px !important;
}

.header-city-select-wrap .select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
    right: 32px !important;
    color: var(--text-secondary) !important;
}

.header-city-select-wrap .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    right: 14px !important;
    border-color: var(--text-secondary) transparent transparent transparent !important;
}

/* Custom styling for the dropdown list */
.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 16px !important;
    border: 1px solid var(--border-color) !important;
    background-color: var(--card-bg) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden !important;
    margin-top: 6px !important;
    animation: select2FadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes select2FadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.select2-container--bootstrap-5 .select2-results__option {
    padding: 10px 16px !important;
    font-size: 0.88rem !important;
    color: var(--text-primary) !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
}

.select2-container--bootstrap-5 .select2-search__field {
    border-radius: 20px !important;
    padding: 8px 14px !important;
    border: 1px solid var(--border-color) !important;
    background-color: var(--yt-input-bg) !important;
    color: var(--text-primary) !important;
    outline: none !important;
}

.yt-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-add-ad-btn {
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 20px;
    background: var(--accent-gradient);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--accent-color), transparent 82%);
}

.header-add-ad-btn:hover {
    color: #fff !important;
    opacity: 0.95;
}

.header-add-ad-btn__free {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
}

.nav-location-chk {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-location-chk .form-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.nav-location-chk .form-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--yt-input-bg);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    white-space: nowrap;
}

.nav-location-chk .form-check-label::before {
    content: "\F3E3"; /* bi-geo-alt */
    font-family: "bootstrap-icons";
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.nav-location-chk .form-check-label:hover {
    background-color: var(--yt-button-hover);
    border-color: var(--accent-color);
}

.nav-location-chk .form-check-input:checked + .form-check-label {
    background: var(--accent-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-color), transparent 75%);
}

.nav-location-chk .form-check-input:checked + .form-check-label::before {
    transform: scale(1.15);
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.theme-toggle-btn:hover {
    background: var(--yt-button-hover);
}

.theme-toggle-btn .sun-icon { display: none; }
.theme-toggle-btn .moon-icon { display: block; }
[data-theme="dark"] .theme-toggle-btn .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle-btn .moon-icon { display: none; }

.header-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: visible;
}

.header-user-avatar__image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.header-user-avatar.has-photo {
    background: transparent;
}

.header-user-avatar::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: max(100%, 248px);
    height: 10px;
    z-index: 1009;
    display: none;
}

.header-user-avatar:hover::after {
    display: block;
}

.user-dropdown-menu {
    position: absolute;
    top: 46px;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    width: 248px;
    display: none;
    flex-direction: column;
    z-index: 1010;
    overflow: hidden;
}

.user-dropdown-menu > div {
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    line-height: 1.25 !important;
}
.header-user-avatar:hover .user-dropdown-menu,
.user-dropdown-menu:hover {
    display: flex;
}

.user-dropdown-menu a, .user-dropdown-menu button {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--text-primary);
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-dropdown-menu a i,
.user-dropdown-menu button i {
    width: 24px;
    flex: 0 0 24px;
    font-size: 1.35rem;
    text-align: center;
}
.user-dropdown-menu a:hover, .user-dropdown-menu button:hover {
    background: var(--yt-button-hover);
    text-decoration: none;
}

.yt-login-btn {
    background: var(--accent-color);
    color: #fff !important;
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.92rem;
    line-height: 1;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.yt-login-btn i {
    font-size: 1.15rem;
}
.yt-login-btn:hover {
    opacity: 0.9;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    padding: 12px;
    background: var(--header-bg);
    display: flex;
    flex-direction: column;
    z-index: 995;
    overflow-y: auto;
    transition: transform 0.2s ease, width 0.2s ease, padding 0.2s ease;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    gap: 18px;
    padding: 12px 14px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.25;
    transition: background-color 0.15s ease;
}

.nav-links a:hover {
    background: var(--yt-button-hover);
}

.nav-links li.active a {
    background: var(--yt-button-hover);
    font-weight: 500;
    color: var(--accent-color);
}

.nav-links i {
    width: 28px;
    flex: 0 0 28px;
    font-size: 1.5rem;
    text-align: center;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 24px;
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.2s ease, width 0.2s ease;
}

@media (min-width: 993px) {
    :root.sidebar-collapsed .sidebar {
        width: var(--sidebar-collapsed-width);
        padding: 10px 4px;
    }

    :root.sidebar-collapsed .main-content {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }

    :root.sidebar-collapsed .nav-links {
        gap: 4px;
    }

    :root.sidebar-collapsed .nav-links a {
        min-height: 64px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 8px 4px;
        border-radius: 10px;
        font-size: 0.68rem;
        line-height: 1.05;
        text-align: center;
    }

    :root.sidebar-collapsed .nav-links i {
        width: auto;
        flex: 0 0 auto;
        font-size: 1.45rem;
    }

    :root.sidebar-collapsed .nav-links span {
        width: 100%;
        max-width: 68px;
        max-height: 2.15em;
        display: -webkit-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* Category Pills Bar */
.subject-chips-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
    scrollbar-width: none;
}
.subject-chips-container::-webkit-scrollbar {
    display: none;
}

.chip-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--yt-input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    text-decoration: none !important;
}

.chip-btn:hover {
    background: var(--yt-button-hover);
}

.chip-btn.active {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

/* Grid layout for ads: 4 columns on large screens */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

@media (min-width: 1400px) {
    #adsGrid .col-lg-3 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* Ad Card YouTube-Style styling */
.ad-card-wrapper {
    text-decoration: none !important;
    display: block;
}

.ad-card {
    border: none;
    border-radius: 12px;
    background: var(--card-bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.ad-card-media-wrap {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* 3:4 Aspect ratio for mobile shorts */
    background: #000;
    overflow: hidden;
}

.ad-card-media-wrap.aspect-16-9 {
    padding-top: 56.25%; /* 16:9 Aspect ratio */
}

.ad-card-media-wrap img, .ad-card-media-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    z-index: 2;
}

.ad-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    z-index: 2;
}

.ad-card-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.ad-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.ad-card-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.ad-card-badges {
    display: flex;
    gap: 6px;
    margin-top: auto;
    flex-wrap: wrap;
}

.badge-city, .badge-category {
    font-size: 0.68rem;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-city {
    background: var(--yt-button-hover);
    color: var(--text-primary);
}

.badge-category {
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    color: var(--accent-color);
}

/* Watch Page Layout (`watch.php`) */
.watch-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

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

.watch-main-col {
    display: flex;
    flex-direction: column;
}

.watch-player-wrapper {
    position: relative;
    width: 100%;
    max-width: min(100%, calc((100svh - 64px - 48px - 16px - 44px - 84px) * 9 / 16));
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
}

.watch-player-wrapper.wide-ratio {
    max-width: min(100%, calc((100svh - 64px - 48px - 16px - 44px - 84px) * 9 / 16));
    aspect-ratio: 9 / 16;
}

.watch-player-wrapper video,
.watch-player-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.watch-player-wrapper[data-media-type="text"] {
    background: var(--card-bg);
}

.watch-text-card {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 32px;
    text-align: center;
    overflow: auto;
}

.watch-text-card__content {
    max-width: 92%;
    font-size: clamp(1rem, 1.7vw, 1.45rem);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.watch-meta {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.watch-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.watch-ad-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
}

.watch-ad-price {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--accent-color);
    white-space: nowrap;
}
@media (max-width: 768px) {
    .watch-title-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .watch-ad-title {
        font-size: 1.12rem;
        line-height: 1.28;
    }

    .watch-ad-price {
        align-self: flex-start;
        display: inline-flex;
        align-items: center;
        min-height: 38px;
        padding: 7px 14px;
        border: 1px solid color-mix(in srgb, var(--accent-color) 28%, transparent);
        border-radius: 999px;
        background: color-mix(in srgb, var(--accent-color) 12%, transparent);
        box-shadow: 0 8px 22px color-mix(in srgb, var(--accent-color), transparent 86%);
        font-size: 1.1rem;
        font-weight: 500;
        line-height: 1;
    }
}

.watch-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.watch-action-btn {
    background: var(--yt-input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.watch-action-btn:hover {
    background: var(--yt-button-hover);
}

.watch-action-btn.btn-accent {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
}
.watch-action-btn.btn-accent:hover {
    opacity: 0.9;
}

.watch-action-btn.is-favorite {
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #be123c);
    border-color: transparent;
}

.favorite-toggle {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.favorite-toggle:hover {
    transform: scale(1.05);
}

.favorite-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent-color) 45%, transparent);
    outline-offset: 2px;
}

.favorite-toggle.is-loading {
    opacity: 0.65;
    cursor: wait;
}

.favorite-toggle--card {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 8;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
}

.favorite-toggle--card i {
    font-size: 1.18rem;
}

.favorite-toggle--card.is-favorite {
    color: #fff;
    background: linear-gradient(135deg, #f43f5e, #be123c);
}


/* Shared account/list pages: favorites, my ads, payments */
.account-page {
    width: min(100%, 920px);
    margin: 0 auto;
    padding: 8px 0 52px;
}

.account-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.account-page__title {
    margin: 0 0 5px;
    color: var(--text-primary);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 500;
    line-height: 1.15;
}

.account-page__subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.45;
}

.account-page__count {
    min-width: 44px;
    height: 44px;
    padding: 0 13px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--accent-gradient);
    font-weight: 500;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--accent-color), transparent 80%);
}

.account-page__loading,
.favorites-page__loading {
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.account-empty,
.favorites-empty,
.empty-state {
    max-width: 560px;
    margin: 30px auto;
    padding: 38px 26px;
    text-align: center;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.account-empty__icon,
.favorites-empty__icon,
.empty-state-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--accent-gradient);
    font-size: 1.75rem;
    opacity: 1;
    box-shadow: 0 10px 26px color-mix(in srgb, var(--accent-color), transparent 82%);
}

.account-empty h2,
.account-empty h3,
.favorites-empty h2,
.empty-state h3,
.payments-login-panel h1 {
    margin: 0 0 9px;
    color: var(--text-primary);
    font-size: 1.22rem;
    font-weight: 500;
    line-height: 1.25;
}

.account-empty p,
.favorites-empty p,
.empty-state p,
.payments-login-panel p {
    max-width: 440px;
    margin: 0 auto 20px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.52;
}

.account-primary-btn,
.favorites-primary-btn,
.btn-add-new,
.payments-login-btn {
    border: 0;
    border-radius: 22px;
    min-height: 42px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff !important;
    background: var(--accent-gradient);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    white-space: normal;
    cursor: pointer;
}

.account-primary-btn:hover,
.favorites-primary-btn:hover,
.btn-add-new:hover,
.payments-login-btn:hover {
    color: #fff !important;
    opacity: 0.95;
}

.home-conversion-strip,
.myads-growth-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 18px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 20%, var(--border-color));
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent-color) 7%, var(--card-bg));
}

.home-conversion-strip {
    position: relative;
    padding-right: 40px !important;
}

.home-conversion-strip__close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    transition: background-color 0.2s, color 0.2s;
}

.home-conversion-strip__close:hover {
    background-color: color-mix(in srgb, var(--text-secondary) 15%, transparent);
    color: var(--text-primary);
}

.home-conversion-strip__copy,
.myads-growth-panel__copy {
    min-width: 0;
}

.home-conversion-strip__eyebrow,
.myads-growth-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    color: var(--accent-color);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
}

.home-conversion-strip h1,
.myads-growth-panel h2 {
    margin: 0 0 3px;
    color: var(--text-primary);
    font-size: clamp(1rem, 1.55vw, 1.18rem);
    font-weight: 500;
    line-height: 1.12;
}

.home-conversion-strip p,
.myads-growth-panel p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.25;
}

.home-conversion-strip__actions,
.myads-growth-panel__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.account-secondary-btn,
.home-conversion-strip__secondary,
.myads-growth-panel__secondary {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none !important;
}

.account-secondary-btn:hover,
.home-conversion-strip__secondary:hover,
.myads-growth-panel__secondary:hover {
    background: var(--yt-button-hover);
    color: var(--text-primary) !important;
}

.business-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    color: var(--accent-color);
    font-size: 0.76rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .home-conversion-strip,
    .myads-growth-panel {
        grid-template-columns: 1fr;
        padding: 9px 10px;
        border-radius: 12px;
    }

    .home-conversion-strip__actions,
    .myads-growth-panel__actions {
        justify-content: stretch;
    }

    .home-conversion-strip__actions > *,
    .myads-growth-panel__actions > * {
        width: 100%;
    }
}

@media (max-width: 768px) {
    body.account-page-body .main-content {
        padding: 14px 10px;
    }

    .account-page {
        width: 100%;
        padding: 4px 0 34px;
    }

    .account-page__header {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 14px;
    }

    .account-page__title {
        font-size: 1.28rem;
    }

    .account-page__subtitle {
        font-size: 0.86rem;
    }

    .account-empty,
    .favorites-empty,
    .empty-state {
        max-width: none;
        margin: 18px 0;
        padding: 30px 18px;
        border-radius: 16px;
    }

    .account-empty__icon,
    .favorites-empty__icon,
    .empty-state-icon {
        width: 62px;
        height: 62px;
        font-size: 1.55rem;
    }

    .account-primary-btn,
    .favorites-primary-btn,
    .btn-add-new,
    .payments-login-btn {
        width: 100%;
        min-height: 44px;
        padding: 11px 14px;
    }
}

.favorites-page {
    width: min(100%, 920px);
    margin: 0 auto;
    padding: 8px 0 52px;
}

.favorites-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.favorites-page__header h1 {
    margin: 0 0 5px;
    color: var(--text-primary);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 500;
    line-height: 1.15;
}

.favorites-page__header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.favorites-count {
    min-width: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--text-secondary);
    background: transparent;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: none;
}

.favorites-page__loading {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
}

.favorites-list {
    display: grid;
    gap: 14px;
}

.favorite-list-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px;
    padding: 13px;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.favorite-list-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.favorite-list-card.is-removing {
    opacity: 0;
    transform: translateX(16px);
}

.favorite-list-card__media {
    position: relative;
    display: block;
    height: 140px;
    overflow: hidden;
    border-radius: 12px;
    color: var(--text-secondary);
    background: var(--yt-input-bg);
}

.favorite-list-card__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.favorite-list-card__fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.favorite-list-card__video {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 0.72rem;
    font-weight: 500;
}

.favorite-list-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.favorite-list-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.favorite-list-card__title {
    color: var(--text-primary);
    font-size: 1.04rem;
    font-weight: 500;
    line-height: 1.42;
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.favorite-list-card__title:hover {
    color: var(--accent-color);
}

.favorite-toggle--list {
    flex-shrink: 0;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 20px;
    color: var(--text-secondary);
    background: var(--yt-input-bg);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.favorite-toggle--list.is-favorite {
    color: #fff;
    background: var(--accent-gradient);
    border-color: transparent;
}

.favorite-toggle--list:hover {
    color: #fff;
    background: var(--danger-color);
    border-color: transparent;
}

.favorite-list-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.favorite-list-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 16px;
}

.favorite-list-card__footer strong {
    color: var(--accent-color);
    font-size: 1.05rem;
    font-weight: 500;
}

.favorite-list-card__open {
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
}

.favorite-list-card__open:hover {
    color: var(--accent-color);
}

.favorites-empty {
    max-width: 560px;
    margin: 30px auto;
    padding: 38px 26px;
    text-align: center;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.favorites-empty__icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--accent-gradient);
    font-size: 1.8rem;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--accent-color), transparent 80%);
}

.favorites-empty h2 {
    margin: 0 0 9px;
    font-size: 1.22rem;
    font-weight: 500;
}

.favorites-empty p {
    max-width: 470px;
    margin: 0 auto 22px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.favorites-primary-btn {
    border: 0;
    border-radius: 22px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff !important;
    background: var(--accent-gradient);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.favorites-toast-container {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.favorites-toast {
    max-width: min(360px, calc(100vw - 36px));
    padding: 12px 16px;
    border-radius: 12px;
    color: #fff;
    background: #1f2937;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 0.86rem;
    font-weight: 500;
}

.favorites-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.favorites-toast--success {
    background: #166534;
}

.favorites-toast--error {
    background: #991b1b;
}

.favorites-toast--info {
    background: #334155;
}

@media (max-width: 560px) {
    .favorite-list-card {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
        border-radius: 15px;
    }

    .favorite-list-card__media {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .favorite-list-card__top {
        gap: 10px;
    }

    .favorite-list-card__meta {
        gap: 7px 10px;
    }

    .favorite-list-card__footer {
        gap: 8px;
    }
}

@media (max-width: 720px) {
    .favorite-list-card {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
        padding: 10px;
    }

    .favorite-list-card__media {
        height: 118px;
    }

    .favorite-toggle--list span {
        display: none;
    }

    .favorite-toggle--list {
        width: 38px;
        padding: 0;
    }

    .favorite-list-card__title {
        font-size: 0.92rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .favorite-list-card__footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
        padding-top: 10px;
    }
}

/* Final mobile override for favorites list */

@media (max-width: 560px) {
    .favorite-list-card {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .favorite-list-card__media {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .favorite-list-card__top {
        align-items: flex-start;
    }

    .favorite-toggle--list {
        width: auto;
        min-width: 38px;
        padding: 8px 11px;
    }

    .favorite-toggle--list span {
        display: inline;
    }

    .favorite-list-card__footer {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 430px) {
    .favorite-list-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .favorite-toggle--list {
        width: 38px;
        padding: 0;
    }

    .favorite-toggle--list span {
        display: none;
    }
}

.watch-description-box {
    background: var(--yt-input-bg);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    font-size: 0.92rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.desc-meta {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.watch-comments-section {
    margin-top: 24px;
}

.comments-header {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.comment-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.comment-input-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input-container textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    outline: none;
    resize: none;
    font-size: 0.9rem;
    padding: 6px 0;
}
.comment-input-container textarea:focus {
    border-bottom-color: var(--text-primary);
}

.comment-input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.watch-recommended-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recommended-title {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.rec-ad-card {
    display: flex;
    gap: 12px;
    text-decoration: none !important;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s ease;
}
.rec-ad-card:hover {
    background: var(--yt-card-hover-bg);
}

.rec-thumbnail {
    width: 120px;
    height: 90px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}
.rec-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rec-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.rec-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* User Profile & Auth Styles */
.auth-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    max-width: 440px;
    width: 100%;
    margin: 40px auto;
    box-shadow: var(--shadow-md);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--yt-input-bg);
    color: var(--text-primary);
    outline: none;
    font-size: 0.9rem;
}
.form-group textarea {
    height: auto;
    padding: 10px 12px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent-color);
}

.btn-auth-submit {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 20px;
    height: 40px;
    width: 100%;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 12px;
}
.btn-auth-submit:hover {
    opacity: 0.95;
}

/* User Dashboard (`myads.php`) */
.myads-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.myads-title {
    font-size: 1.6rem;
    font-weight: 500;
}

.myad-row-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .myad-row-card {
        flex-direction: column;
        align-items: stretch;
    }
}

.myad-thumbnail {
    width: 100px;
    height: 75px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}
.myad-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.myad-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.myad-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.myad-dates {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.myad-status-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
}
.myad-status-pill.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}
.myad-status-pill.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.myad-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Multi-step/Color Picker custom additions for Add-Ad Form */
.color-inputs-row {
    display: flex;
    gap: 12px;
}
.color-picker-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.color-picker-group label {
    font-size: 0.8rem;
    font-weight: 500;
}
.color-picker-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}
.color-picker-input-wrap input[type="color"] {
    width: 42px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}
.color-picker-input-wrap input[type="text"] {
    flex-grow: 1;
}

/* Upload Progress Ring/Bar */
.upload-progress-container {
    background: var(--yt-input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    display: none;
}
.upload-progress-bar-wrap {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}
.upload-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    transition: width 0.1s ease;
}

/* Custom Coordinate picker styling */
.location-coords-box {
    background: var(--yt-input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-gps-get {
    background: var(--yt-button-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Shell panels for general layouts */
.about-shell, .contact-shell {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    max-width: 800px;
    margin: 20px auto;
}
.about h1, .contact h1, .about-shell h1, .contact-shell h1 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 12px;
}
.about p, .contact p, .about-shell p, .contact-shell p {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Sticky top categories bar overrides */
.top-categories-bar {
    position: sticky;
    top: 64px;
    z-index: 990;
    background: var(--bg-color);
    padding: 9px 0;
    margin-top: -24px;
    /* border-bottom: 1px solid var(--border-color); */
}

.top-categories-panel {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Ensure background matches the theme */
#categoriesCheckboxes .form-check-label {
    background: var(--yt-input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

#categoriesCheckboxes .form-check-input:checked + .form-check-label {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-color);
}

/* Mobile layout optimizations for yt-header */
@media (max-width: 576px) {
    .yt-header-center {
        margin: 0 4px;
        gap: 6px;
    }
    .yt-search-form {
        border-radius: 20px;
    }
    .yt-search-box input {
        padding: 0 6px;
        font-size: 0.85rem;
    }
    .yt-search-btn {
        width: 44px;
    }
    .yt-login-btn {
        padding: 0;
        border-radius: 50%;
        width: 38px;
        height: 38px;
        justify-content: center;
        gap: 0;
        background: transparent;
        color: var(--text-primary) !important;
        border: 1px solid var(--border-color);
    }
    .yt-login-btn i {
        font-size: 1.4rem;
    }
    .yt-login-btn:hover {
        background: var(--yt-button-hover);
    }
}

/* Category scroll button styling overrides to match category badges */
.categories-scroll {
    align-items: center !important;
}

.categories-scroll__btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: var(--badge-bg) !important;
    border: 1px solid var(--badge-border) !important;
    color: var(--badge-color) !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 34px !important; /* Force exact square shape, no oval stretching */
    flex-shrink: 0 !important;
    transition: all 0.15s ease;
}

.categories-scroll__btn:hover {
    background: var(--yt-button-hover) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Align chips vertically, remove bottom offsets */
#categoriesCheckboxes {
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
}

#categoriesCheckboxes .form-check {
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Removed obsolete flat white overrides for logo text to let CSS variables drive branding colors */

/* Select2 Dark Mode Support Overrides for Redesign */
[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection {
    background-color: var(--yt-input-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--yt-button-hover) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .select2-container--bootstrap-5 .select2-search__field {
    background-color: var(--yt-input-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Likes & Dislikes Pill Component */
.watch-like-dislike-container {
    display: inline-flex;
    background: var(--yt-input-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    align-items: center;
    height: 38px;
    box-sizing: border-box;
}

.watch-like-dislike-container .watch-action-btn {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 16px !important;
    height: 100% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.watch-like-dislike-container .watch-action-btn:hover {
    background-color: var(--yt-button-hover) !important;
}

.watch-like-dislike-container .like-dislike-divider {
    width: 1px;
    height: 20px;
    background-color: var(--border-color);
}

.watch-like-dislike-container .watch-action-btn.active {
    color: var(--accent-color) !important;
}

.watch-like-dislike-container .watch-action-btn.is-loading {
    opacity: 0.65;
    cursor: wait;
}

/* Ad Card Reactions Stats */
.ad-card-reactions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    color: inherit;
    font-size: 0.74rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

[data-theme="dark"] .ad-card-reactions {
    background: rgba(255, 255, 255, 0.08);
}

.ad-card-reactions--floating {
    position: absolute;
    top: 62px;
    right: 12px;
    z-index: 8;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-top: 0;
    padding: 0;
    background: transparent;
    color: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.ad-card-reactions--floating .ad-card-reaction-btn {
    min-width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ad-card-reactions--floating .ad-card-reaction-btn:hover,
.ad-card-reactions--floating .ad-card-reaction-btn.active {
    color: #ffffff;
    background: var(--accent-gradient);
}

.ad-card-reactions span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.95;
}

.ad-card-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    opacity: 0.95;
    transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.ad-card-reaction-btn:hover,
.ad-card-reaction-btn.active {
    color: var(--accent-color);
    opacity: 1;
}

.ad-card-reaction-btn:active {
    transform: scale(0.94);
}

.ad-card-reaction-btn.is-loading {
    cursor: wait;
    opacity: 0.65;
}

.ad-card-reaction-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-color) 55%, transparent);
    outline-offset: 2px;
}

.ad-card-reactions i {
    font-size: 0.8rem;
}

/* Alignment inside dashboard rows */
.ad-row-meta .ad-card-reactions {
    margin-top: 0;
    color: var(--text-secondary);
}






/* Shorts page */
body.shorts-page {
    background: #0f0f0f !important;
    color: #ffffff !important;
    overflow: hidden;
}

body.shorts-page .app-container {
    min-height: 100vh;
    padding-top: 64px;
    background: #0f0f0f;
}

body.shorts-page .yt-header {
    background: rgba(15, 15, 15, 0.94);
    border-bottom-color: #272727;
    color: #ffffff;
}

body.shorts-page .yt-logo,
body.shorts-page .yt-header i,
body.shorts-page .theme-toggle-btn,
body.shorts-page .yt-search-box input,
body.shorts-page .nav-location-chk .form-check-label {
    color: #ffffff;
}

body.shorts-page .yt-search-form,
body.shorts-page .nav-location-chk .form-check-label,
body.shorts-page .header-city-select-wrap .select2-container--bootstrap-5 .select2-selection {
    background: #202020 !important;
    border-color: #303030 !important;
}

body.shorts-page .yt-search-btn {
    background: #2a2a2a;
    border-left-color: #303030;
    color: #ffffff;
}

body.shorts-page .sidebar {
    background: #0f0f0f;
    border-right: 1px solid #272727;
}

body.shorts-page .nav-links a {
    color: #f1f1f1;
}

body.shorts-page .nav-links a:hover,
body.shorts-page .nav-links li.active a {
    background: #272727;
    color: #ffffff;
}

body.shorts-page .main-content.shorts-main {
    min-height: calc(100vh - 64px);
    padding: 0;
    overflow: hidden;
}

.shorts-shell {
    position: relative;
    height: calc(100vh - 64px);
    overflow: hidden;
    background: #0f0f0f;
}

.shorts-feed {
    height: calc(100vh - 64px);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 clamp(72px, 8vw, 132px) 0 0;
    scrollbar-width: none;
}

.shorts-feed::-webkit-scrollbar {
    display: none;
}

.shorts-feed__item {
    width: 100%;
    min-height: calc(100vh - 64px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 0;
}

.shorts-feed__player {
    width: min(660px, 100%);
    height: min(82vh, calc(100vh - 100px));
    min-height: 460px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
}

body.shorts-page .shorts-feed__player .ad-card {
    width: min(430px, calc((100vh - 104px) * 0.5625));
    height: 100% !important;
    max-height: 760px;
    aspect-ratio: 9 / 16;
    flex: 0 0 auto;
    border: 0;
    border-radius: 16px;
    background: #000000 !important;
    color: #ffffff !important;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.55) !important;
    transform: none !important;
}

body.shorts-page .shorts-feed__player .ad-card:hover {
    transform: none !important;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.55) !important;
}

@media (min-width: 2200px) and (min-height: 1100px) {
    .shorts-feed__player {
        --shorts-large-card-height: calc(100vh - 100px);
        --shorts-large-card-width: calc(var(--shorts-large-card-height) * 0.5625);
        width: min(calc(var(--shorts-large-card-width) + 86px), calc(100vw - 260px));
        height: var(--shorts-large-card-height);
    }

    body.shorts-page .shorts-feed__player .ad-card {
        width: min(var(--shorts-large-card-width), calc(100vw - 346px));
        height: var(--shorts-large-card-height) !important;
        max-height: none;
    }
}

body.shorts-page .ad-card-media,
body.shorts-page .ad-card-noimage,
body.shorts-page .ad-card[data-media-type="video"] .ad-card-media {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    background: #000000;
}

body.shorts-page .ad-card-media img,
body.shorts-page .ad-card-media video,
body.shorts-page .ad-card[data-media-type="video"] .ad-card-media img,
body.shorts-page .ad-card[data-media-type="video"] .ad-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.shorts-page .ad-card-noimage {
    padding: 28px;
    color: #ffffff;
    font-size: 1.05rem;
    line-height: 1.45;
}

body.shorts-page .ad-card > .favorite-toggle--card,
body.shorts-page .ad-actions {
    display: none !important;
}

body.shorts-page .ad-overlay {
    min-height: 55%;
    align-items: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.36) 46%, rgba(0, 0, 0, 0));
}

body.shorts-page .ad-content {
    width: 100%;
    padding: 86px 18px 18px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #ffffff !important;
}

body.shorts-page .video-progress {
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.24);
}

body.shorts-page .video-progress__bar {
    background: #ffffff;
}

body.shorts-page .video-badges {
    top: 14px;
    left: 14px;
}

body.shorts-page .video-action-badge,
body.shorts-page .sound-action-badge {
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    padding: 0;
    background: rgba(15, 15, 15, 0.68);
    color: #ffffff;
    backdrop-filter: blur(8px);
}

body.shorts-page .sound-action-badge {
    top: 14px;
    right: 14px;
}

body.shorts-page .ad-price-top {
    top: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 15, 15, 0.68);
    font-size: 0.95rem;
}

body.shorts-page .ad-text {
    max-height: 112px;
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.35;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

body.shorts-page .ad-meta {
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.8rem;
}

body.shorts-page .ad-card-reactions {
    display: inline-flex;
    gap: 8px;
}

.shorts-actions {
    flex: 0 0 72px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 4px;
    color: #ffffff;
}

body.shorts-page .shorts-actions .shorts-action-btn {
    width: 68px;
    min-height: 68px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: #ffffff !important;
    text-decoration: none !important;
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
}

body.shorts-page .shorts-actions .shorts-action-btn i {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    color: #ffffff;
    font-size: 1.16rem;
    transition: background 0.18s ease, transform 0.18s ease;
}

body.shorts-page .shorts-actions .shorts-action-btn:hover i,
body.shorts-page .shorts-actions .shorts-action-btn:focus-visible i {
    background: #3a3a3a;
    transform: translateY(-1px);
}

body.shorts-page .shorts-actions .favorite-toggle.is-favorite i {
    background: #ff0033;
}

body.shorts-page .shorts-actions .shorts-reaction-btn.active i {
    background: var(--accent-color);
    color: #ffffff;
}

body.shorts-page .shorts-actions .shorts-reaction-btn.is-loading {
    cursor: wait;
    opacity: 0.68;
}

body.shorts-page .shorts-actions .shorts-reaction-btn:disabled {
    cursor: wait;
}

body.shorts-page .shorts-actions .ad-btn.call.is-loading::after {
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
}

.shorts-action-label {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.shorts-page .shorts-actions .js-shorts-comments {
    min-height: 76px;
}

.shorts-action-count {
    display: block;
    width: 100%;
    min-height: 0.75rem;
    color: inherit;
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.shorts-page .shorts-actions .js-shorts-comments .shorts-action-label {
    font-size: 0.58rem;
    opacity: 0.82;
}

.shorts-more {
    position: relative;
    width: 68px;
    display: flex;
    justify-content: center;
}

.shorts-more-menu {
    position: absolute;
    right: 76px;
    bottom: 0;
    z-index: 20;
    min-width: 184px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(32, 32, 32, 0.96);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
    opacity: 0;
    pointer-events: none;
    transform: translateX(8px) scale(0.98);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.shorts-more.is-open .shorts-more-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
}

.shorts-more-menu__item {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    background: transparent;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.shorts-more-menu__item:hover,
.shorts-more-menu__item:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.shorts-more-menu__item i {
    width: 18px;
    flex: 0 0 18px;
    font-size: 1rem;
}

.shorts-page-nav {
    position: fixed;
    right: clamp(18px, 3vw, 44px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 990;
}

.shorts-page-nav__btn {
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #2a2a2a;
    font-size: 1.1rem;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.shorts-page-nav__btn:hover:not(:disabled) {
    background: #3a3a3a;
    transform: translateY(-1px);
}

.shorts-page-nav__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.shorts-empty {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 500;
}

.shorts-feed__sentinel {
    flex: 0 0 1px;
}

@media (max-width: 992px) {
    body.shorts-page .main-content.shorts-main {
        margin-left: 0;
        width: 100%;
    }

    body.shorts-page .sidebar {
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
    }
}

@media (max-width: 768px) {
    body.shorts-page .app-container {
        padding-top: 0;
    }

    body.shorts-page .yt-header {
        height: 0;
        min-height: 0;
        padding: 0;
        border: 0;
        background: transparent !important;
        box-shadow: none;
        overflow: visible;
        pointer-events: none;
    }

    body.shorts-page .yt-header-center,
    body.shorts-page .yt-header-right,
    body.shorts-page .yt-logo {
        display: none !important;
    }

    body.shorts-page .yt-header-left {
        position: fixed;
        top: max(10px, env(safe-area-inset-top));
        left: 10px;
        z-index: 1260;
        width: auto;
        height: auto;
        pointer-events: none;
    }

    body.shorts-page .menu-toggle-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(20, 20, 20, 0.72);
        color: #ffffff !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
        pointer-events: auto;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    body.shorts-page .menu-toggle-btn i {
        color: #ffffff !important;
    }

    body.shorts-page .sidebar {
        top: 0;
        z-index: 1250;
    }

    body.shorts-page .main-content.shorts-main,
    body.shorts-page .shorts-shell,
    body.shorts-page .shorts-feed,
    body.shorts-page .shorts-feed__item,
    body.shorts-page .shorts-feed__player,
    body.shorts-page .shorts-feed__player .ad-card {
        min-height: 100vh;
        min-height: 100svh;
    }

    body.shorts-page .shorts-shell,
    body.shorts-page .shorts-feed,
    body.shorts-page .shorts-feed__player,
    body.shorts-page .shorts-feed__player .ad-card {
        height: 100vh;
        height: 100svh;
    }

    .shorts-feed {
        padding: 0;
    }

    .shorts-feed__item {
        position: relative;
        padding: 0;
    }

    .shorts-feed__player {
        position: relative;
        width: 100%;
        min-height: 0;
        gap: 0;
        overflow: visible;
    }

    body.shorts-page .shorts-feed__player .ad-card {
        width: 100%;
        max-height: none;
        border-radius: 0;
        box-shadow: none !important;
    }

    body.shorts-page .shorts-feed__player > .shorts-actions {
        position: absolute !important;
        right: 8px !important;
        top: max(12px, calc(env(safe-area-inset-top) + 10px)) !important;
        z-index: 30 !important;
        flex-basis: auto !important;
        gap: 6px;
        padding-top: 0;
        padding-bottom: 0;
    }

    body.shorts-page .shorts-actions .shorts-action-btn {
        width: 58px;
        min-height: 58px;
        font-size: 0.62rem;
    }

    body.shorts-page .shorts-actions .js-shorts-comments {
        min-height: 66px;
    }

    body.shorts-page .shorts-actions .shorts-action-btn i {
        width: 42px;
        height: 42px;
        background: rgba(20, 20, 20, 0.72);
    }

    body.shorts-page .yt-header-center {
        display: flex !important;
        position: fixed;
        top: max(10px, env(safe-area-inset-top));
        left: 62px;
        z-index: 1260;
        width: auto;
        max-width: none;
        margin: 0;
        gap: 0;
        pointer-events: auto;
    }

    body.shorts-page .yt-header-center .yt-search-form,
    body.shorts-page .yt-header-center .header-city-select-wrap {
        display: none !important;
    }

    body.shorts-page .mobile-location-btn {
        display: inline-flex;
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border: 0;
        background: rgba(20, 20, 20, 0.72);
        color: #ffffff !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
        pointer-events: auto;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    body.shorts-page .mobile-location-btn i {
        color: #ffffff !important;
    }

    body.shorts-page .mobile-location-btn.is-active {
        background: var(--accent-gradient);
    }

    .shorts-page-nav {
        display: none;
    }

    body.shorts-page .ad-content {
        padding-right: 76px;
        padding-bottom: 20px;
    }
}


/* Shorts light theme support */
:root[data-theme="light"] body.shorts-page,
:root:not([data-theme="dark"]) body.shorts-page {
    background: var(--bg-color) !important;
    color: var(--text-primary) !important;
}

:root[data-theme="light"] body.shorts-page .app-container,
:root:not([data-theme="dark"]) body.shorts-page .app-container,
:root[data-theme="light"] .shorts-shell,
:root:not([data-theme="dark"]) .shorts-shell {
    background: var(--bg-color);
}

:root[data-theme="light"] body.shorts-page .yt-header,
:root:not([data-theme="dark"]) body.shorts-page .yt-header {
    background: color-mix(in srgb, var(--header-bg) 92%, transparent);
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

:root[data-theme="light"] body.shorts-page .yt-logo,
:root[data-theme="light"] body.shorts-page .yt-header i,
:root[data-theme="light"] body.shorts-page .theme-toggle-btn,
:root[data-theme="light"] body.shorts-page .yt-search-box input,
:root[data-theme="light"] body.shorts-page .nav-location-chk .form-check-label,
:root:not([data-theme="dark"]) body.shorts-page .yt-logo,
:root:not([data-theme="dark"]) body.shorts-page .yt-header i,
:root:not([data-theme="dark"]) body.shorts-page .theme-toggle-btn,
:root:not([data-theme="dark"]) body.shorts-page .yt-search-box input,
:root:not([data-theme="dark"]) body.shorts-page .nav-location-chk .form-check-label {
    color: var(--text-primary);
}

:root[data-theme="light"] body.shorts-page .yt-search-form,
:root[data-theme="light"] body.shorts-page .nav-location-chk .form-check-label,
:root[data-theme="light"] body.shorts-page .header-city-select-wrap .select2-container--bootstrap-5 .select2-selection,
:root:not([data-theme="dark"]) body.shorts-page .yt-search-form,
:root:not([data-theme="dark"]) body.shorts-page .nav-location-chk .form-check-label,
:root:not([data-theme="dark"]) body.shorts-page .header-city-select-wrap .select2-container--bootstrap-5 .select2-selection {
    background: var(--yt-input-bg) !important;
    border-color: var(--border-color) !important;
}

:root[data-theme="light"] body.shorts-page .yt-search-btn,
:root:not([data-theme="dark"]) body.shorts-page .yt-search-btn {
    background: var(--yt-button-hover);
    border-left-color: var(--border-color);
    color: var(--text-primary);
}

:root[data-theme="light"] body.shorts-page .sidebar,
:root:not([data-theme="dark"]) body.shorts-page .sidebar {
    background: var(--header-bg);
    border-right: 1px solid var(--border-color);
}

:root[data-theme="light"] body.shorts-page .nav-links a,
:root:not([data-theme="dark"]) body.shorts-page .nav-links a {
    color: var(--text-primary);
}

:root[data-theme="light"] body.shorts-page .nav-links a:hover,
:root[data-theme="light"] body.shorts-page .nav-links li.active a,
:root:not([data-theme="dark"]) body.shorts-page .nav-links a:hover,
:root:not([data-theme="dark"]) body.shorts-page .nav-links li.active a {
    background: var(--yt-button-hover);
    color: var(--accent-color);
}

:root[data-theme="light"] .shorts-actions,
:root:not([data-theme="dark"]) .shorts-actions {
    color: var(--text-primary);
}

:root[data-theme="light"] body.shorts-page .shorts-actions .shorts-action-btn,
:root:not([data-theme="dark"]) body.shorts-page .shorts-actions .shorts-action-btn {
    color: var(--text-primary) !important;
}

:root[data-theme="light"] body.shorts-page .shorts-actions .shorts-action-btn i,
:root:not([data-theme="dark"]) body.shorts-page .shorts-actions .shorts-action-btn i,
:root[data-theme="light"] .shorts-page-nav__btn,
:root:not([data-theme="dark"]) .shorts-page-nav__btn {
    background: #f2f2f2;
    color: #0f0f0f;
    box-shadow: none;
}

:root[data-theme="light"] body.shorts-page .shorts-actions .shorts-action-btn:hover i,
:root[data-theme="light"] body.shorts-page .shorts-actions .shorts-action-btn:focus-visible i,
:root[data-theme="light"] .shorts-page-nav__btn:hover:not(:disabled),
:root:not([data-theme="dark"]) body.shorts-page .shorts-actions .shorts-action-btn:hover i,
:root:not([data-theme="dark"]) body.shorts-page .shorts-actions .shorts-action-btn:focus-visible i,
:root:not([data-theme="dark"]) .shorts-page-nav__btn:hover:not(:disabled) {
    background: #e5e5e5;
}

:root[data-theme="light"] .shorts-empty,
:root:not([data-theme="dark"]) .shorts-empty {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    :root[data-theme="light"] body.shorts-page .shorts-actions .shorts-action-btn,
    :root:not([data-theme="dark"]) body.shorts-page .shorts-actions .shorts-action-btn {
        color: #ffffff !important;
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    }

    :root[data-theme="light"] body.shorts-page .shorts-actions .shorts-action-btn i,
    :root:not([data-theme="dark"]) body.shorts-page .shorts-actions .shorts-action-btn i {
        background: rgba(255, 255, 255, 0.88);
        color: #0f0f0f;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    }
}


:root[data-theme="light"] body.shorts-page .yt-login-btn,
:root[data-theme="light"] body.shorts-page .yt-login-btn i,
:root:not([data-theme="dark"]) body.shorts-page .yt-login-btn,
:root:not([data-theme="dark"]) body.shorts-page .yt-login-btn i,
:root[data-theme="light"] body.shorts-page .nav-location-chk .form-check-input:checked + .form-check-label,
:root:not([data-theme="dark"]) body.shorts-page .nav-location-chk .form-check-input:checked + .form-check-label {
    color: #ffffff !important;
}

:root[data-theme="light"] .shorts-more-menu,
:root:not([data-theme="dark"]) .shorts-more-menu {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 46px rgba(15, 15, 15, 0.18);
}

:root[data-theme="light"] .shorts-more-menu__item,
:root:not([data-theme="dark"]) .shorts-more-menu__item {
    color: var(--text-primary);
}

:root[data-theme="light"] .shorts-more-menu__item:hover,
:root[data-theme="light"] .shorts-more-menu__item:focus-visible,
:root:not([data-theme="dark"]) .shorts-more-menu__item:hover,
:root:not([data-theme="dark"]) .shorts-more-menu__item:focus-visible {
    color: var(--text-primary);
    background: var(--yt-button-hover);
}

:root[data-theme="light"] body.shorts-page .shorts-actions .favorite-toggle.is-favorite i,
:root:not([data-theme="dark"]) body.shorts-page .shorts-actions .favorite-toggle.is-favorite i,
:root[data-theme="light"] body.shorts-page .shorts-actions .shorts-reaction-btn.active i,
:root:not([data-theme="dark"]) body.shorts-page .shorts-actions .shorts-reaction-btn.active i {
    background: #ff0033;
    color: #ffffff;
}


/* Shorts snap-scroll must not inherit global section offsets */
body.shorts-page section,
body.shorts-page .section {
    scroll-margin-top: 0 !important;
}

body.shorts-page .shorts-shell,
body.shorts-page .shorts-feed__item {
    scroll-margin-top: 0 !important;
}

body.shorts-page .shorts-shell {
    padding: 0;
}


/* Shorts report drawer */
.shorts-report-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.shorts-report-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.shorts-report-panel {
    position: fixed;
    top: 72px;
    right: 18px;
    z-index: 1200;
    width: min(420px, calc(100vw - 32px));
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
    transform: translateX(calc(100% + 28px));
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.shorts-report-panel.is-open {
    transform: translateX(0);
}

.shorts-report-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border-color);
}

.shorts-report-panel__header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.08rem;
    font-weight: 500;
}

.shorts-report-panel__close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: transparent;
    cursor: pointer;
}

.shorts-report-panel__close:hover {
    background: var(--yt-button-hover);
}

.shorts-report-panel__body {
    padding: 16px;
}

.shorts-report-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shorts-report-form label {
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 500;
}

.shorts-report-form select,
.shorts-report-form textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    background: var(--yt-input-bg);
    font: inherit;
}

.shorts-report-form textarea {
    min-height: 92px;
    resize: vertical;
}

.shorts-report-submit {
    width: 100%;
    margin-top: 4px;
}

[data-theme="dark"] .shorts-report-panel {
    background: #1f1f1f;
    border-color: #303030;
}

@media (max-width: 768px) {
    .shorts-more {
        width: 58px;
    }

    .shorts-more-menu {
        right: 64px;
        bottom: 0;
        min-width: 166px;
        border-color: rgba(255, 255, 255, 0.18);
        background: rgba(20, 20, 20, 0.92);
    }

    .shorts-report-backdrop {
        background: rgba(0, 0, 0, 0.48);
    }

    .shorts-report-panel {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .shorts-report-panel.is-open {
        transform: translateY(0);
    }
}

/* Shorts comments drawer */
.shorts-comments-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.shorts-comments-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.shorts-comments-panel {
    position: fixed;
    top: 72px;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    width: min(420px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
    transform: translateX(calc(100% + 28px));
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.shorts-comments-panel.is-open {
    transform: translateX(0);
}

.shorts-comments-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border-color);
}

.shorts-comments-panel__header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.08rem;
    font-weight: 500;
}

.shorts-comments-panel__header span {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
}

.shorts-comments-panel__close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: transparent;
    cursor: pointer;
}

.shorts-comments-panel__close:hover {
    background: var(--yt-button-hover);
}

.shorts-comments-panel__body {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px 16px 16px;
}

.shorts-comments-input {
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.shorts-comments-avatar,
.shorts-comment__avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    font-size: 0.82rem;
}

.shorts-comments-input .comment-input-container textarea {
    min-height: 36px;
    max-height: 120px;
}

.shorts-comments-input .comment-input-actions .btn-primary {
    border: 0;
    border-radius: 18px;
    background: var(--accent-gradient);
    font-weight: 500;
}

.shorts-comments-input .comment-input-actions .btn-secondary {
    border: 0;
    border-radius: 18px;
    color: var(--text-primary);
    background: var(--yt-button-hover);
}

.shorts-comments-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.shorts-comments-refresh.is-loading i {
    animation: shorts-refresh-spin 0.75s linear infinite;
}

@keyframes shorts-refresh-spin {
    to {
        transform: rotate(360deg);
    }
}

.shorts-comments-list {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shorts-comment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.shorts-comment__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem;
}

.shorts-comment__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.shorts-comment__meta strong {
    color: var(--text-primary);
    font-size: 0.88rem;
}

.shorts-comment__meta span {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.shorts-comment__delete {
    border: 0;
    padding: 0;
    color: var(--danger-color);
    background: transparent;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
}

.shorts-comment p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.42;
    white-space: pre-line;
    word-break: break-word;
}

.shorts-comments-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.shorts-comments-empty--error {
    color: var(--danger-color);
}

[data-theme="dark"] .shorts-comments-panel {
    background: #1f1f1f;
    border-color: #303030;
}

[data-theme="dark"] .shorts-comments-input .comment-input-actions .btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
    .shorts-comments-backdrop {
        background: rgba(0, 0, 0, 0.48);
    }

    .shorts-comments-panel {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: min(76vh, 680px);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .shorts-comments-panel.is-open {
        transform: translateY(0);
    }
}


/* Mobile header keeps the brand visible while reducing secondary controls. */
@media (max-width: 768px) {
    .theme-toggle-btn {
        display: none !important;
    }

    .yt-header-left {
        gap: 8px;
    }

    .yt-logo {
        display: none;
    }

    .yt-header-center {
        max-width: none;
        min-width: 0;
        margin: 0 8px;
        gap: 8px;
    }

    .yt-search-form {
        min-width: 0;
        flex: 1 1 auto;
    }

    body.category-page .mobile-location-btn,
    body.shorts-page .mobile-location-btn {
        display: inline-flex;
    }

    .yt-logo-text {
        display: none;
    }

    .header-add-ad-btn {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 50%;
    }

    .header-add-ad-btn span,
    .header-add-ad-btn__free {
        display: none;
    }
}


/* Header inputs and category chips radius normalization */
.yt-header .yt-search-form,
.yt-header .yt-search-box input,
.yt-header .header-select,
.yt-header .form-select,
.yt-header .nav-location-chk .form-check-label,
.yt-header .select2-container--bootstrap-5 .select2-selection,
.yt-header .select2-container--bootstrap-5 .select2-search__field,
#categoriesCheckboxes .form-check-label {
    border-radius: 10px !important;
}


/* Shared legal footer for account/app pages */
.app-legal-footer {
    margin-top: 24px;
    padding: 18px 0 22px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-secondary);
}

.app-legal-footer .copyright {
    font-size: 0.82rem;
}

.app-legal-footer p {
    margin: 6px 0 0;
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.footer-legal-link {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-legal-link:hover,
.footer-legal-link:focus-visible {
    color: var(--accent-color);
    text-decoration: none;
}

.legal-section .about-title {
    margin-bottom: 12px;
}

.legal-section h2 {
    margin: 26px 0 10px;
    color: var(--text-primary);
    font-size: clamp(1.05rem, 1.8vw, 1.24rem);
    font-weight: 500;
    line-height: 1.22;
}

.legal-section p,
.legal-section li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.62;
}

.legal-section ul {
    margin: 0 0 14px;
    padding-left: 1.2rem;
}

.legal-section li {
    margin-bottom: 7px;
}

.legal-section .account-secondary-btn {
    width: auto;
    min-height: 40px;
    padding: 9px 14px;
}

.home-conversion-strip + .top-categories-bar {
    margin-top: 0;
}
