/* ==========================================================
   Root Variables
========================================================== */

:root {

    --color-white: #ffffff;
    --color-black: #0f0f0f;

    --color-border: #d3d3d3;

    --color-hover: #f2f2f2;

    --color-button: #f8f8f8;

    --color-text-secondary: #606060;

    --header-height: 56px;

    --transition: 0.2s ease;

    --border-radius: 40px;

}


/* ==========================================================
   Reset
========================================================== */

*,
*::before,
*::after {

    margin: 0;
    padding: 0;

    box-sizing: border-box;

}

html {

    scroll-behavior: smooth;

}

body {

    font-family: "Roboto", sans-serif;

    background: var(--color-white);

    color: var(--color-black);

    transition: background 0.2s ease, color 0.2s ease;

}

body.loading {
  overflow: hidden;
}

.skeleton,
.skeleton::before,
.skeleton::after {
  position: relative;
  overflow: hidden;
  background: #e5e5e5;
}

body.dark .skeleton,
body.dark .skeleton::before,
body.dark .skeleton::after {
  background: #2a2a2a;
}

.skeleton::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.fade-out {
  animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

body.dark {

    background: #0f0f0f;

    color: #ffffff;

    --bg-primary: #0f0f0f;

    --bg-secondary: #181818;

    --bg-tertiary: #121212;

    --surface: #181818;

    --surface-hover: #232323;

    --border: #303030;

    --text-primary: #ffffff;

    --text-secondary: #aaaaaa;

    --icon: #ffffff;

    --accent: #3ea6ff;

    --chip: #181818;

    --chip-hover: #272727;

    --chip-active: #ffffff;

    --chip-active-text: #0f0f0f;

    --search-background: #121212;

    --search-border: #303030;

    --search-hover: #222222;

    --sidebar-hover: #272727;

    --card-border: rgba(255,255,255,0.06);

    --scrollbar-track: #0f0f0f;

    --scrollbar-thumb: #303030;

    --scrollbar-thumb-hover: #414141;

    --focus-ring: rgba(62,166,255,0.35);

}

body.dark .app-header,
body.dark .video-section {

    background: var(--bg-primary);

    color: var(--text-primary);

}

body.dark .app-header {

    border-bottom: 1px solid var(--border);

}

body.dark .app-sidebar,
body.dark .category-section,
body.dark .video-card,
body.dark .watch-panel,
body.dark .search-suggestions,
body.dark .empty-state,
body.dark .related-card,
body.dark .comment-card {

    background: var(--surface);

    color: var(--text-primary);

}

body.dark .search-input {

    background: var(--search-background);

    border-color: var(--search-border);

    color: var(--text-primary);

}

body.dark .search-input::placeholder {

    color: var(--text-secondary);

}

body.dark .search-input:focus-visible {

    outline: 2px solid var(--focus-ring);

    outline-offset: 2px;

    box-shadow: 0 0 0 1px rgba(62,166,255,0.2);

}

body.dark .icon-button:focus-visible,
body.dark .profile-button:focus-visible,
body.dark .create-button:focus-visible,
body.dark .category-chip:focus-visible,
body.dark .sidebar-link:focus-visible,
body.dark .search-button:focus-visible,
body.dark .comment-form button:focus-visible {

    outline: 2px solid var(--focus-ring);

    outline-offset: 2px;

}

body.dark .search-button {

    background: var(--search-hover);

    border-color: var(--search-border);

    color: var(--text-primary);

}

body.dark .search-button:hover {

    background: #2a2a2a;

}

body.dark #voiceSearchButton,
body.dark .icon-button,
body.dark .profile-button,
body.dark .create-button {

    background: var(--search-background);

    border: 1px solid transparent;

    color: var(--text-primary);

}

body.dark .icon-button:hover,
body.dark .profile-button:hover,
body.dark .create-button:hover,
body.dark .search-button:hover {

    background: var(--search-hover);

}

body.dark .create-button {

    border-color: var(--search-border);

}

body.dark .sidebar-link,
body.dark .sidebar-heading,
body.dark .sidebar-footer,
body.dark .video-meta,
body.dark .video-card .video-title,
body.dark .video-card .video-channel,
body.dark .video-card .video-info,
body.dark .comment-form input,
body.dark .comment-form textarea,
body.dark .page-status {

    color: var(--text-secondary);

}

body.dark .sidebar-link {

    color: var(--text-primary);

}

body.dark .sidebar-link:hover,
body.dark .sidebar-link.active {

    background: var(--sidebar-hover);

}

body.dark .sidebar-link.active {

    background: #272727;

}

body.dark .sidebar-link iconify-icon {

    color: var(--icon);

}

body.dark .sidebar-heading {

    color: var(--text-primary);

}

body.dark .sidebar-footer {

    color: var(--text-secondary);

}

body.dark .sidebar-divider {

    border-top-color: var(--border);

}

body.dark .category-chip {

    background: var(--chip);

    color: var(--text-primary);

    border: 1px solid transparent;

}

body.dark .category-chip:hover {

    background: var(--chip-hover);

}

body.dark .category-chip.active {

    background: var(--chip-active);

    color: var(--chip-active-text);

}

body.dark .video-card {

    background: var(--surface);

    color: var(--text-primary);

    border: 1px solid var(--card-border);

}

body.dark .video-card:hover {

    background: #202020;

    box-shadow: 0 2px 10px rgba(0,0,0,0.14);

}

body.dark .video-card .video-title {

    color: var(--text-primary);

}

body.dark .video-card .video-channel,
body.dark .video-card .video-info,
body.dark .video-meta {

    color: var(--text-secondary);

}

body.dark .watch-panel {

    background: var(--surface);

    border: 1px solid var(--border);

}

body.dark .video-player {

    background: #000000;

}

body.dark .watch-details,
body.dark .related-list {

    color: var(--text-primary);

}

body.dark .watch-actions button,
body.dark .comment-form button {

    background: #222222;

    color: var(--text-primary);

    border: 1px solid var(--border);

}

body.dark .watch-actions button:hover,
body.dark .comment-form button:hover {

    background: #2f2f2f;

}

body.dark .comment-form input,
body.dark .comment-form textarea {

    background: var(--search-background);

    border: 1px solid var(--search-border);

    color: var(--text-primary);

}

body.dark .search-suggestions {

    background: var(--search-background);

    border: 1px solid var(--search-border);

    box-shadow: none;

}

body.dark .search-suggestions button:hover {

    background: var(--search-hover);

}

body.dark .icon-button,
body.dark .profile-button {

    border: 1px solid transparent;

}

body.dark .icon-button:hover,
body.dark .profile-button:hover {

    background: var(--search-hover);

}

body.dark .create-button:hover {

    background: var(--search-hover);

}

body.dark .category-section {

    background: var(--bg-primary);

    border-bottom: 1px solid var(--border);

}

body.dark .video-section {

    background: var(--bg-primary);

}

body.dark .related-card:hover {

    background: #1f1f1f;

}

body.dark .empty-state,
body.dark .error-state,
body.dark .not-found-state {

    background: var(--surface);

    border-color: var(--border);

    color: var(--text-primary);

}

body.dark ::-webkit-scrollbar {

    width: 10px;

    height: 10px;

}

body.dark ::-webkit-scrollbar-track {

    background: var(--scrollbar-track);

}

body.dark ::-webkit-scrollbar-thumb {

    background: var(--scrollbar-thumb);

    border-radius: 999px;

    border: 2px solid var(--scrollbar-track);

}

body.dark ::-webkit-scrollbar-thumb:hover {

    background: var(--scrollbar-thumb-hover);

}

body.dark {

    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);

    scrollbar-width: thin;

}

img {

    display: block;

    max-width: 100%;

}

button,
input {

    font: inherit;

}

button {

    background: none;

    border: none;

    cursor: pointer;

}

a {

    text-decoration: none;

    color: inherit;

}


/* ==========================================================
   Utility
========================================================== */

.visually-hidden {

    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;

    margin: -1px;

    overflow: hidden;

    clip: rect(0,0,0,0);

    border: 0;

}


/* ==========================================================
   Header
========================================================== */

.app-header {

    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    height: var(--header-height);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 16px;

    background: var(--color-white);

    border-bottom: 1px solid #e5e5e5;

}

/* ==========================================================
   Header Left
========================================================== */

.header-left {

    display: flex;

    align-items: center;

    gap: 20px;

    min-width: 170px;

}

.brand {

    display: flex;

    align-items: center;

    flex-shrink: 0;

}

.brand-logo {

    display: block;

    height: 24px;

    width: auto;

    opacity: 1;

}

body.dark .brand-logo {

    content: url('assets/images/logo-white.svg');

}

body:not(.dark) .brand-logo {

    content: url('assets/images/logo.svg');

}

.brand-country {

    font-size: 10px;

    color: var(--color-text-secondary);

    margin-left: 2px;

}


/* ==========================================================
   Header Center
========================================================== */

.header-center {

    flex: 1;

    display: flex;

    justify-content: center;

    align-items: center;

    max-width: 720px;

    margin: 0 32px;

}

.search-form {

    width: 100%;

    display: flex;

    align-items: center;

}

.search-input {

    flex: 1;

    height: 40px;

    padding: 0 16px;

    font-size: 16px;

    border: 1px solid var(--color-border);

    border-right: none;

    border-radius: var(--border-radius) 0 0 var(--border-radius);

    outline: none;

}

.search-input:focus {

    border-color: #1c62b9;

}

.search-button {

    width: 64px;

    height: 40px;

    border: 1px solid var(--color-border);

    background: var(--color-button);

    border-radius: 0 var(--border-radius) var(--border-radius) 0;

}

.search-button:hover {

    background: var(--color-hover);

}

#voiceSearchButton {

    margin-left: 12px;

}


/* ==========================================================
   Header Right
========================================================== */

.header-right {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 12px;

    min-width: 200px;

}

/* ==========================================================
   Common Buttons
========================================================== */

.icon-button,
.profile-button {

    width: 40px;

    height: 40px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: var(--transition);

}

.icon-button:hover,
.profile-button:hover {

    background: var(--color-hover);

}

iconify-icon {

    font-size: 24px;

}


/* ==========================================================
   Create Button
========================================================== */

.create-button {

    display: flex;

    align-items: center;

    gap: 8px;

    height: 36px;

    padding: 0 16px;

    border-radius: 999px;

    background: var(--color-hover);

    transition: var(--transition);

}

.create-button:hover {

    background: #e5e5e5;

}


/* ==========================================================
   Profile
========================================================== */

.profile-image {

    width: 32px;

    height: 32px;

    border-radius: 50%;

    object-fit: cover;

}


/* ==========================================================
   Responsive
========================================================== */

@media (max-width: 768px) {

    .header-center {

        margin: 0 16px;

    }

    .create-button span {

        display: none;

    }

    .create-button {

        width: 40px;

        padding: 0;

        justify-content: center;

    }

}

@media (max-width: 640px) {

    .search-form {

        display: none;

    }

    .header-center {

        flex: 0;

        margin: 0;

    }

    #voiceSearchButton {

        display: none;

    }

    .app-sidebar {

        position: fixed;

        left: -100%;

        top: var(--header-height);

        z-index: 900;

        transition: left 0.2s ease;

        box-shadow: 0 8px 24px rgba(0,0,0,0.16);

    }

    .app-sidebar.open {

        left: 0;

    }

    .main-content {

        padding: 0 12px 24px;

        overflow: visible;

    }

    .video-grid {

        grid-template-columns: 1fr;

    }

}


/* ==========================================================
   Main Layout
========================================================== */

.app-layout{

    display:flex;

    align-items:flex-start;

}


/* ==========================================================
   Sidebar
========================================================== */

.app-sidebar {

    width: 240px;

    flex-shrink: 0;

    height: calc(100vh - var(--header-height));

    position: sticky;

    top: var(--header-height);

    overflow-y: auto;

    background: var(--color-white);

    padding: 12px 0;

    scrollbar-width: thin;

}


/* ==========================================================
   Sidebar Navigation
========================================================== */

.sidebar-navigation {

    display: flex;

    flex-direction: column;

}


/* ==========================================================
   Sidebar Section
========================================================== */

.sidebar-section {

    display: flex;

    flex-direction: column;

    padding: 4px 12px;

}


/* ==========================================================
   Sidebar Link
========================================================== */

.sidebar-link {

    display: flex;

    align-items: center;

    gap: 24px;

    height: 40px;

    padding: 0 12px;

    border-radius: 10px;

    font-size: 14px;

    font-weight: 400;

    color: var(--color-black);

    transition: var(--transition);

}

.sidebar-link:hover {

    background: var(--color-hover);

}

.sidebar-link.active {

    background: #e5e5e5;

    font-weight: 500;

}


/* ==========================================================
   Sidebar Icons
========================================================== */

.sidebar-link iconify-icon {

    font-size: 22px;

    min-width: 24px;

}


/* ==========================================================
   Sidebar Heading
========================================================== */

.sidebar-heading {

    font-size: 16px;

    font-weight: 500;

    padding: 8px 12px;

    color: var(--color-black);

}


/* ==========================================================
   Divider
========================================================== */

.sidebar-divider {

    border: none;

    border-top: 1px solid #e5e5e5;

    margin: 12px 0;

}


/* ==========================================================
   Sidebar Footer
========================================================== */

.sidebar-footer {

    padding: 16px;

    font-size: 12px;

    line-height: 1.6;

    color: var(--color-text-secondary);

}


/* ==========================================================
   Sidebar Scrollbar
========================================================== */

.app-sidebar::-webkit-scrollbar {

    width: 8px;

}

.app-sidebar::-webkit-scrollbar-thumb {

    background: #cfcfcf;

    border-radius: 999px;

}

.app-sidebar::-webkit-scrollbar-thumb:hover {

    background: #b0b0b0;

}


/* ==========================================================
   Categories
========================================================== */

.main-content {

    flex: 1;

}

.category-section {

    position: sticky;

    top: var(--header-height);

    z-index: 200;

    width: 100%;

    padding: 6px 24px 0;

    background: var(--color-white);

    border-bottom: 1px solid #e5e5e5;

}

.category-list {

    display: flex;

    align-items: center;

    gap: 10px;

    width: 100%;

    padding: 0 0 4px;

    overflow-x: auto;

    overflow-y: hidden;

    white-space: nowrap;

    scroll-behavior: smooth;

    overscroll-behavior-x: contain;

    scrollbar-width: none;

    -ms-overflow-style: none;

    -webkit-overflow-scrolling: touch;

    background: transparent;

}

.category-list::-webkit-scrollbar {

    display: none;

}

.category-chip {

    flex-shrink: 0;

    height: 32px;

    padding: 0 12px;

    border: none;

    border-radius: 999px;

    background: #f2f2f2;

    color: var(--color-black);

    font-size: 14px;

    font-weight: 500;

    line-height: 32px;

    cursor: pointer;

    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;

}

.category-chip:hover {

    background: #e5e5e5;

}

.category-chip:focus-visible {

    outline: 2px solid #1c62b9;

    outline-offset: 2px;

}

.category-chip.active {

    background: var(--color-black);

    color: var(--color-white);

}

@media (max-width: 768px) {

    .category-section {

        padding: 0 16px;

    }

    .category-list {

        padding: 0 0 4px;

    }

    .category-chip {

        height: 30px;

        padding: 0 12px;

        font-size: 13px;

        line-height: 30px;

    }

}

@media (max-width: 640px) {

    .category-section {

        padding: 0 12px;

    }

}

.page-status {

    display: none;

}

.video-section {

    padding: 20px 24px 0;

}

.video-grid {

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;

}

.video-card {

    display: flex;

    flex-direction: column;

    gap: 10px;

    padding: 12px;

    border-radius: 14px;

    overflow: hidden;

    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease;

}

.video-card:hover {

    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(0,0,0,0.08);

}

.video-thumbnail {

    position: relative;

    aspect-ratio: 16 / 9;

    background: #f2f2f2;

    border-radius: 12px;

    overflow: hidden;

}

.video-thumbnail img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}

.video-duration {

    position: absolute;

    right: 8px;

    bottom: 8px;

    padding: 4px 8px;

    background: rgba(0,0,0,0.8);

    color: white;

    border-radius: 6px;

    font-size: 12px;

    font-weight: 500;

}

.video-content {

    display: flex;

    gap: 12px;

    padding: 0 2px 4px;

}

.channel-avatar {

    width: 36px;

    height: 36px;

    border-radius: 50%;

    object-fit: cover;

    flex-shrink: 0;

}

.video-details {

    display: flex;

    flex-direction: column;

    gap: 4px;

    min-width: 0;

}

.video-title {

    font-size: 15px;

    font-weight: 500;

    line-height: 1.4;

    display: -webkit-box;

    line-clamp: 2;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;

}

.video-channel,
.video-info {

    font-size: 13px;

    color: var(--color-text-secondary);

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}

.video-meta {

    display: flex;

    align-items: center;

    gap: 6px;

    color: var(--color-text-secondary);

    font-size: 13px;

}

.verified-badge {

    color: #1f9cf0;

    font-size: 14px;

}

.skeleton-card {

    height: 220px;

    border-radius: 14px;

    background: linear-gradient(90deg, #f2f2f2 25%, #e5e5e5 50%, #f2f2f2 75%);

    background-size: 200% 100%;

    animation: shimmer 1.2s infinite;

}

@keyframes shimmer {

    0% { background-position: 200% 0; }

    100% { background-position: -200% 0; }

}

.empty-state,
.error-state,
.not-found-state {

    grid-column: 1 / -1;

    padding: 48px 24px;

    text-align: center;

    border: 1px solid #e5e5e5;

    border-radius: 16px;

    background: #fafafa;

}

.search-suggestions {

    position: absolute;

    top: calc(100% + 8px);

    left: 0;

    right: 0;

    background: white;

    border: 1px solid #e5e5e5;

    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(0,0,0,0.12);

    z-index: 1100;

    overflow: hidden;

}

.search-suggestions button {

    width: 100%;

    text-align: left;

    padding: 12px 16px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    background: transparent;

}

.search-suggestions button:hover {

    background: #f2f2f2;

}

.watch-panel {

    margin: 20px 24px 0;

    padding: 24px;

    border-radius: 16px;

    background: #fafafa;

    border: 1px solid #e5e5e5;

}

/* Video player specifics */
.video-player video,
.video-player iframe {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px;
    background: #000;
    border: none;
}

.video-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #111111, #333333);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.video-player::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.08);
    pointer-events: none;
    border-radius: 16px;
}

.watch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.watch-actions button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #f2f2f2;
    color: #111;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-size: 13px;
    cursor: pointer;
}

.watch-actions button:hover {
    transform: translateY(-1px);
    background: #e8e8e8;
}

.watch-actions button:active {
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.12);
}

.watch-actions button:focus-visible {
    outline: 3px solid rgba(62,166,255,0.5);
    outline-offset: 3px;
}

.watch-actions button.active {
    background: #d1edff;
    border-color: #8accff;
}

.channel-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    margin: 16px 0;
}

.channel-card .channel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-card .channel-meta {
    flex: 1;
}

.channel-card .channel-meta h3 {
    margin-bottom: 4px;
    font-size: 18px;
}

.channel-card .channel-meta p {
    color: var(--color-text-secondary);
    font-size: 13px;
}

.channel-card .subscribe-button {
    padding: 12px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #cc0000;
    color: #fff;
    font-weight: 700;
    transition: background 0.2s ease;
}

.channel-card .subscribe-button.subscribed {
    background: #e8e8e8;
    color: #111;
    border: 1px solid #c6c6c6;
}

.channel-card .subscribe-button:hover {
    background: #b30000;
}

.channel-card .subscribe-button.subscribed:hover {
    background: #d6d6d6;
}

.description-card {
    margin: 16px 0;
    padding: 16px;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
}

.description-card p {
    margin-bottom: 12px;
    color: #333;
    line-height: 1.6;
}

.description-card .description-toggle {
    border: none;
    background: none;
    color: #065fd4;
    cursor: pointer;
    font-weight: 500;
}

.comment-card {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fafafa;
    border: 1px solid #eaeaea;
}

.comment-card .comment-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.comment-card .comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #d9d9d9;
    color: #333;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.comment-card .comment-meta {
    flex: 1;
}

.comment-card .comment-meta strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.comment-card .comment-meta span {
    color: var(--color-text-secondary);
    font-size: 12px;
}

.comment-card .comment-actions {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    color: var(--color-text-secondary);
    font-size: 13px;
}

.comment-card .comment-actions button {
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.related-card {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    background: #fafafa;
    transform: translateY(-2px);
}

.related-card img {
    width: 40%;
    min-width: 132px;
    border-radius: 12px;
    object-fit: cover;
}

.related-card .related-info {
    flex: 1;
    position: relative;
}

.related-card .related-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.related-card .related-info p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

.related-card .related-info .related-meta {
    margin-top: 8px;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 1024px) {
    .video-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .video-grid {
      grid-template-columns: 1fr;
    }
    .watch-grid {
      grid-template-columns: 1fr;
    }
}

.watch-panel.theater .video-player {
    border-radius: 8px;
}

/* Mini player pinned to corner */
.watch-panel.mini {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 320px;
    z-index: 2000;
    box-shadow: 0 12px 32px rgba(0,0,0,0.28);
}

.watch-panel.mini .watch-grid {
    grid-template-columns: 1fr;
}

.watch-panel.mini .video-player {
    aspect-ratio: 16/9;
}

/* small adjustments for control buttons */
.watch-actions button,
.watch-actions select,
.watch-actions label {
    font-size: 13px;
}

.watch-grid {

    display: grid;

    grid-template-columns: 1.7fr 0.9fr;

    gap: 24px;

}

.video-player {

    aspect-ratio: 16 / 9;

    background: linear-gradient(135deg, #111111, #333333);

    border-radius: 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: white;

    font-size: 20px;

    font-weight: 600;

}

.watch-details h1 {

    font-size: 24px;

    margin: 16px 0 8px;

}

.meta-row {

    display: flex;

    align-items: center;

    gap: 10px;

    flex-wrap: wrap;

    margin: 10px 0 16px;

    color: var(--color-text-secondary);

}

.watch-actions button {

    margin-right: 8px;

    border: 1px solid #e5e5e5;

    padding: 8px 12px;

    border-radius: 999px;

    background: #fff;

}

.comment-form {

    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-top: 16px;

}

.comment-form input,
.comment-form textarea {

    border: 1px solid #e5e5e5;

    border-radius: 10px;

    padding: 10px 12px;

    background: #fff;

}

.comment-form button {

    align-self: flex-start;

    padding: 10px 14px;

    border-radius: 999px;

    background: #ff0000;

    color: white;

}

.comment-card {

    padding: 12px 0;

    border-bottom: 1px solid #e5e5e5;

}

.related-list {

    display: flex;

    flex-direction: column;

    gap: 12px;

}

.related-card {

    display: flex;

    gap: 10px;

    align-items: flex-start;

    padding: 8px;

    border-radius: 10px;

    cursor: pointer;

}

.related-card:hover {

    background: #f2f2f2;

}

.related-card img {

    width: 120px;
    border-radius: 8px;
    flex-shrink: 0;
}

.watch-grid.not-found-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
    padding: 40px 20px;
}

.not-found-message {
    text-align: center;
    background: rgba(255,255,255,0.96);
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 32px;
    max-width: 520px;
    width: 100%;
}

.not-found-message h1 {
    margin-bottom: 14px;
    font-size: 28px;
}

.not-found-message p {
    margin-bottom: 22px;
    color: var(--color-text-secondary);
}

.not-found-message button {
    padding: 12px 20px;
    border: none;
    border-radius: 999px;
    background: #ff0000;
    color: white;
    cursor: pointer;
}

.app-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(18,18,18,0.92);
    color: #fff;
    padding: 12px 20px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.app-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 1024px) {

    .video-grid {

        grid-template-columns: repeat(3, minmax(0, 1fr));

    }

    .watch-grid {

        grid-template-columns: 1fr;

    }

}

@media (max-width: 768px) {

    .video-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));

    }

    .watch-panel {

        margin: 16px 12px 0;

    }

}

