* {
    box-sizing: border-box;
}

:root {
    --bg: #0f0f0f;
    --panel: #181818;
    --panel-2: #202020;
    --text: #f1f1f1;
    --muted: #aaaaaa;
    --line: rgba(255,255,255,0.08);
    --red: #ff0033;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* 헤더 */
.yt-logo-mobile {
    display: none;
}

.yt-logo-desktop {
    display: inline-flex;
}

.yt-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15,15,15,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.yt-header-inner {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 220px;
    align-items: center;
    gap: 20px;
    min-height: 64px;
    padding: 0px 10px;
}

.yt-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.yt-logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.yt-logo-text {
    font-size: 20px;
    letter-spacing: -0.3px;
}

.yt-center {
    display: flex;
    justify-content: center;
}

.yt-search-form {
    width: 100%;
    max-width: 720px;
    display: flex;
    align-items: center;
    gap: 0;
}

.yt-search-input {
    flex: 1;
    height: 42px;
    border: 1px solid #303030;
    background: #121212;
    color: #fff;
    padding: 0 16px;
    border-radius: 999px 0 0 999px;
    outline: none;
}

.yt-search-input::placeholder {
    color: #8f8f8f;
}

.yt-search-btn {
    height: 42px;
    padding: 0 18px;
    border: 1px solid #303030;
    border-left: 0;
    background: #222;
    color: #fff;
    border-radius: 0 999px 999px 0;
    cursor: pointer;
}

.yt-right {
    display: flex;
    justify-content: flex-end;
}

.yt-lang-box {
    display: flex;
    gap: 8px;
}

.yt-lang-box a {
    min-width: 40px;
    height: 36px;
    border-radius: 999px;
    background: #222;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.yt-lang-box a.active {
    background: var(--red);
}

/* 기본 레이아웃 */
.yt-page-wrap {
padding-top: 5px;
    padding-bottom: 40px;
}

.yt-home-layout {
    width: 100%;
}

/* 카테고리 바 */
.yt-category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    position: relative;
    z-index: 5;
}

.yt-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #222;
    color: #fff;
    font-size: 14px;
    transition: background .2s ease, color .2s ease;
}

.yt-pill:hover {
    background: #2b2b2b;
}

.yt-pill.active {
    background: #fff;
    color: #111;
}

/* 공통 제목 */
.yt-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.yt-section-title-row h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.yt-more-link {
    font-size: 15px;
    font-weight: 700;
    color: #cfcfcf;
    text-decoration: none;
    transition: color .2s ease;
    white-space: nowrap;
}

.yt-more-link:hover {
    color: #fff;
}

/* 일반 목록 */
.yt-video-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 16px;
}

.yt-video-card {
    min-width: 0;
}

.yt-video-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
}

.yt-video-thumb img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .25s ease;
}

.yt-video-card:hover .yt-video-thumb img,
.yt-related-item:hover .yt-related-thumb img,
.yt-slide-card:hover .yt-slide-thumb img {
    transform: scale(1.04);
}

.yt-thumb-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #222;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-duration-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.yt-video-body {
    padding-top: 10px;
}

.yt-video-title {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
}

.yt-video-title a {
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-video-sub,
.yt-video-meta,
.yt-related-meta,
.yt-watch-stats {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.yt-video-meta,
.yt-watch-meta-row,
.yt-watch-actions,
.yt-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.yt-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.yt-pagination a {
    min-width: 40px;
    height: 40px;
    border-radius: 20px;
    background: #222;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background .2s ease;
}

.yt-pagination a:hover {
    background: #2d2d2d;
}

.yt-pagination a.active {
    background: var(--red);
}

/* watch */
.yt-watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
}

.yt-player-card {
    background: #000;
    border-radius: 18px;
    overflow: hidden;
}

.yt-video-player {
    width: 100%;
    display: block;
    background: #000;
}

.yt-watch-title {
    margin: 18px 0 10px;
    font-size: 26px;
    line-height: 1.35;
    color: #fff;
}

.yt-watch-meta-row {
    justify-content: space-between;
    margin-bottom: 18px;
}

.yt-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #2a2a2a;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.yt-chip-outline {
    background: transparent;
    border: 1px solid #333;
}

.yt-info-card {
    background: var(--panel);
    border-radius: 16px;
    padding: 18px;
    margin-top: 18px;
}

.yt-info-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #fff;
}

.yt-description-text {
    color: #ddd;
    line-height: 1.7;
    white-space: normal;
    word-break: break-word;
}

.yt-tag {
    padding: 8px 12px;
    border-radius: 999px;
    background: #262626;
    font-size: 13px;
    color: #fff;
}

.yt-side-header {
    margin-bottom: 12px;
}

.yt-side-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.yt-related-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.yt-related-item {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 12px;
}

.yt-related-thumb {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.yt-related-thumb img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .25s ease;
}

.yt-related-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}

.yt-empty-box {
    border-radius: 16px;
    background: var(--panel);
    padding: 24px;
    color: var(--muted);
}

.yt-footer {
    margin-top: 30px;
    border-top: 1px solid var(--line);
    padding: 20px 0 40px;
    color: var(--muted);
}

/* 홈 */
.yt-home-stack {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.yt-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.yt-title-badge {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 0, 51, 0.35);
    background: rgba(255, 0, 51, 0.08);
    color: #d8b7bf;
    font-size: 13px;
    font-weight: 700;
}

.yt-section-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yt-featured-section {
    margin-bottom: 34px;
    padding: 20px 14px 18px;
    border-radius: 18px;
    background: transparent;
}

.yt-section-divider {
    height: 1px;
    margin: 26px 0 30px;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0),
        rgba(255,255,255,0.16),
        rgba(255,255,255,0)
    );
}

.yt-row-section {
    padding-top: 2px;
}

.yt-row-section-topline {
    height: 1px;
    margin-bottom: 20px;
    background: linear-gradient(
        90deg,
        rgba(255,0,51,0),
        rgba(255,0,51,0.28),
        rgba(255,255,255,0.10),
        rgba(255,0,51,0)
    );
}

/* 슬라이더 */
.yt-slider {
    position: relative;
    overflow: hidden;
}

.yt-slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.yt-slider-track::-webkit-scrollbar {
    display: none;
}

.yt-slider-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.yt-slider-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #202020;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.yt-slider-btn:hover {
    background: var(--red);
    transform: translateY(-1px);
}

.yt-slide-card {
    flex: 0 0 calc((100% - 48px) / 4);
    min-width: 0;
}

.yt-slide-card-lg {
    flex: 0 0 calc((100% - 64px) / 5);
}

.yt-slide-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: #151515;
    aspect-ratio: 16 / 9;
}

.yt-slide-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

.yt-slide-body {
    padding-top: 10px;
}

.yt-slide-title {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.42;
    font-weight: 800;
}

.yt-slide-title a {
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-slide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #a7a7a7;
    font-size: 13px;
    line-height: 1.45;
}

.yt-hot-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 30px;
    padding: 0 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, #ff2c67 0%, #ff0033 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(255, 0, 51, 0.28);
}

/* 가시성 보정 */
.yt-section-title-row h2,
.yt-video-title a,
.yt-slide-title a,
.yt-video-sub,
.yt-video-meta,
.yt-more-link {
    color: #fff;
}

.yt-video-sub,
.yt-video-meta,
.yt-slide-meta {
    color: #b0b0b0;
}

/* 데스크탑/태블릿 */
@media (max-width: 1280px) {
    .yt-slide-card-lg {
        flex: 0 0 calc((100% - 48px) / 4);
    }
}

@media (max-width: 1200px) {
    .yt-video-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .yt-watch-layout {
        grid-template-columns: 1fr;
    }

    .yt-slide-card,
    .yt-slide-card-lg {
        flex: 0 0 calc((100% - 32px) / 3);
    }
}

@media (max-width: 900px) {
    .yt-header-inner {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0px 10px;
    }

    .yt-left,
    .yt-center,
    .yt-right {
        justify-content: center;
        display: flex;
    }

    .yt-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .yt-slide-card,
    .yt-slide-card-lg {
        flex: 0 0 calc((100% - 16px) / 2);
    }

    .yt-title-group {
        align-items: flex-start;
    }
}

/* 모바일 */
@media (max-width: 768px) {
    .yt-logo-desktop {
        display: none;
    }

    .container {
        padding: 1 3px;
    }

    .yt-category-bar {
        display: none !important;
    }

    .yt-section-title-row {
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
    }

    .yt-section-title-row h2 {
        font-size: 20px;
    }

    .yt-title-group {
        gap: 8px;
    }

    .yt-title-badge {
        height: 30px;
        padding: 0 12px;
        font-size: 12px;
    }

    .yt-featured-section {
        padding: 16px 0 14px;
        margin-bottom: 24px;
    }

    .yt-home-stack {
        gap: 28px;
    }

    .yt-slider-track {
        gap: 12px;
    }

    .yt-slide-card,
    .yt-slide-card-lg {
        flex: 0 0 78%;
    }

    .yt-slide-title {
        font-size: 15px;
    }

    .yt-slide-meta {
        font-size: 12px;
        gap: 6px;
    }

    .yt-slider-btn {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .yt-video-grid {
        grid-template-columns: 1fr;
    }

    .yt-related-item {
        grid-template-columns: 140px minmax(0, 1fr);
    }

    .yt-watch-title {
        font-size: 22px;
    }

    .yt-search-input {
        min-width: 0;
    }
}

.yt-no-scroll {
    overflow: hidden;
}

/* 헤더 정렬 */
.yt-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.yt-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.yt-lang-desktop {
    display: flex;
}

/* 아이콘 버튼 */
.yt-mobile-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 0, 51, 0.45);
    background: #121212;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.yt-logo-mobile .yt-logo-text {
    font-size: 18px;
    font-weight: 900;
    color: #ff0033;
    line-height: 1;
    white-space: nowrap;
}

.yt-mobile-icon-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.yt-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.yt-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 999px;
}

.yt-search-toggle-btn,
.yt-my-btn {
    display: none;
}

/* 모바일 검색영역 */
.yt-mobile-search {
    display: none;
    padding-top: 12px;
}

.yt-mobile-search.is-open {
    display: block;
}

.yt-search-form-mobile {
    max-width: 100%;
}

/* 드로어 */
.yt-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 140;
}

.yt-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.yt-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 320px);
    height: 100vh;
    background: #111;
    border-right: 1px solid rgba(255,255,255,0.08);
    transform: translateX(-100%);
    transition: transform .28s ease;
    z-index: 150;
    display: flex;
    flex-direction: column;
}

.yt-drawer.is-open {
    transform: translateX(0);
}

.yt-drawer-head {
    height: 64px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.yt-drawer-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.yt-drawer-close {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.yt-drawer-body {
    padding: 16px;
    overflow-y: auto;
}

.yt-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.yt-drawer-link {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    background: #1a1a1a;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.yt-drawer-link.active {
    background: rgba(255, 0, 51, 0.14);
    border: 1px solid rgba(255, 0, 51, 0.35);
}

.yt-drawer-divider {
    height: 1px;
    margin: 18px 0;
    background: rgba(255,255,255,0.08);
}

.yt-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.yt-drawer-action {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    background: #1a1a1a;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.yt-drawer-action-danger {
    color: #ff6b86;
}

.yt-logo-mobile {
    display: none !important;
}

.yt-logo-desktop {
    display: inline-flex !important;
}

@media (max-width: 768px) {
    .yt-logo-desktop {
        display: none !important;
    }

    .yt-logo-mobile {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* 모바일 헤더 */
@media (max-width: 768px) {
    .yt-header-inner {
        grid-template-columns: 52px 1fr 104px;
        align-items: center;
        gap: 0;
        min-height: 68px;
        padding: 0px 10px;
    }

    .yt-logo-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .yt-left {
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .yt-center {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
    }

    .yt-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    .yt-center .yt-search-form {
        display: none;
    }

    .yt-logo {
        gap: 8px;
    }

    .yt-logo-mark {
        display: none;
    }

    .yt-logo-text {
        font-size: 18px;
        font-weight: 900;
        color: #ff0033;
    }

    .yt-menu-btn,
    .yt-search-toggle-btn,
    .yt-my-btn {
        display: inline-flex;
    }

    .yt-lang-desktop {
        display: none;
    }
}