/* =========================================================
   LINK1009 GLOBAL
========================================================= */

:root {
    --l1009-bg: #f5f6f8;
    --l1009-card: #ffffff;
    --l1009-text: #17191d;
    --l1009-muted: #747b86;
    --l1009-line: #e6e8ec;
    --l1009-red: #ef4444;
    --l1009-red-dark: #dc3838;
    --l1009-max: 1180px;
    --l1009-radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--l1009-bg);
    color: var(--l1009-text);
    font-family:
        Pretendard,
        "Noto Sans KR",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

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

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


/* =========================================================
   COMMON HEADER
========================================================= */

.l1009-header {
    position: relative;
    z-index: 50;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--l1009-line);
}

.l1009-header-inner {
    width: min(calc(100% - 40px), var(--l1009-max));
    margin: 0 auto;
}

.l1009-top {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.l1009-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
}

.l1009-logo-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--l1009-red);
    color: #fff;
    font-size: 16px;
    line-height: 1;
}

.l1009-logo-name {
    display: block;
    font-size: 23px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.l1009-logo-sub {
    display: block;
    margin-top: 4px;
    color: #8a9099;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 600;
}

.l1009-search {
    width: min(100%, 440px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.l1009-search input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 15px;
    border: 1px solid #dfe2e7;
    border-radius: 11px;
    outline: 0;
    background: #fff;
    color: #22262c;
    font-size: 14px;
}

.l1009-search input:focus {
    border-color: #b7bcc5;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .025);
}

.l1009-search button {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    background: #202226;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.l1009-search button:hover {
    background: #0e0f11;
}


/* =========================================================
   PLATFORM NAV
========================================================= */

.l1009-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 8px 0 12px;
}

.l1009-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 15px;
    border: 1px solid #e3e5e9;
    border-radius: 999px;
    background: #fff;
    color: #565d67;
    font-size: 13px;
    line-height: 1;
    font-weight: 750;
    white-space: nowrap;
    transition:
        border-color .16s ease,
        background .16s ease,
        color .16s ease;
}

.l1009-nav a:hover {
    border-color: #d1d5db;
    background: #f8f9fa;
    color: #23262b;
}

.l1009-platform-nav {
    flex-wrap: wrap;
}

.l1009-platform-nav a.active {
    border-color: var(--l1009-red);
    background: var(--l1009-red);
    color: #fff;
}


/* =========================================================
   GLOBAL CONTENT
========================================================= */

.l1009-global-content {
    width: 100%;
    min-height: calc(100vh - 220px);
    margin: 0;
    padding: 1px 0 50px;
    background: var(--l1009-bg);
}


/* =========================================================
   YOUTUBE MAIN
========================================================= */

.l1009-main {
    width: min(calc(100% - 40px), var(--l1009-max));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.l1009-intro {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    padding: 42px 44px;
    border: 1px solid #ece4e3;
    border-radius: 24px;
    background:
        radial-gradient(
            circle at 88% 18%,
            rgba(239, 68, 68, .10),
            transparent 26%
        ),
        linear-gradient(135deg, #fff 0%, #fffafa 100%);
    box-shadow: 0 7px 24px rgba(22, 25, 31, .04);
}

.l1009-intro-label {
    margin: 0 0 12px;
    color: var(--l1009-red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.15px;
}

.l1009-intro h1 {
    margin: 0;
    color: #181a1f;
    font-size: clamp(31px, 4vw, 46px);
    line-height: 1.18;
    letter-spacing: -1.7px;
}

.l1009-intro-text {
    max-width: 700px;
    margin: 16px 0 0;
    color: #747a84;
    font-size: 15px;
    line-height: 1.75;
}


/* =========================================================
   CATEGORY DIRECTORY
========================================================= */

.l1009-directory {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.l1009-category {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--l1009-line);
    border-radius: var(--l1009-radius);
    background: var(--l1009-card);
}

.l1009-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 15px;
}

.l1009-category-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.l1009-category-icon {
    flex: 0 0 auto;
    font-size: 21px;
}

.l1009-category-title h2 {
    margin: 0;
    color: #24272c;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.45px;
}

.l1009-all {
    flex: 0 0 auto;
    color: #8a9098;
    font-size: 12px;
    font-weight: 750;
}

.l1009-all:hover {
    color: var(--l1009-red);
}

.l1009-channel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.l1009-channel {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 36px;
    padding: 0 12px;
    overflow: hidden;
    border: 1px solid #e9ebee;
    border-radius: 10px;
    background: #f8f9fa;
    color: #4e555f;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.l1009-channel:hover {
    border-color: #dedfe3;
    background: #f1f2f4;
    color: #24272b;
}

.l1009-channel-empty {
    color: #999fa8;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   POPULAR / RECENT
========================================================= */

.l1009-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 18px;
}

.l1009-box {
    padding: 21px;
    border: 1px solid var(--l1009-line);
    border-radius: var(--l1009-radius);
    background: #fff;
}

.l1009-box h2 {
    margin: 0 0 11px;
    color: #26292e;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.4px;
}

.l1009-rank-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 45px;
    border-bottom: 1px solid #f0f1f3;
}

.l1009-rank-item:last-child {
    border-bottom: 0;
}

.l1009-rank-num {
    color: var(--l1009-red);
    font-size: 13px;
    font-weight: 900;
}

.l1009-rank-name {
    overflow: hidden;
    color: #393d44;
    font-size: 13px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.l1009-rank-cat {
    color: #9a9fa7;
    font-size: 11px;
    white-space: nowrap;
}


/* =========================================================
   FOOTER
========================================================= */

.l1009-footer {
    width: 100%;
    padding: 34px 0 40px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.l1009-footer-inner {
    width: min(calc(100% - 40px), var(--l1009-max));
    margin: 0 auto;
}

.l1009-footer strong {
    color: #282b30;
    font-size: 17px;
    font-weight: 900;
}

.l1009-footer p {
    margin: 8px 0 0;
    color: #8a9099;
    font-size: 13px;
    line-height: 1.65;
}

.l1009-footer-copy {
    margin-top: 12px !important;
    color: #a0a5ad !important;
    font-size: 12px !important;
}

.l1009-header ul,
.l1009-header li,
.l1009-footer ul,
.l1009-footer li {
    margin: 0;
    padding: 0;
    list-style: none;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .l1009-top {
        gap: 18px;
    }

    .l1009-search {
        width: min(100%, 390px);
    }

    .l1009-directory {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 700px) {

    .l1009-header-inner,
    .l1009-main,
    .l1009-footer-inner {
        width: min(calc(100% - 24px), var(--l1009-max));
    }

    .l1009-top {
        min-height: 0;
        padding: 14px 0 11px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .l1009-logo {
        align-self: flex-start;
    }

    .l1009-logo-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .l1009-logo-name {
        font-size: 21px;
    }

    .l1009-search {
        width: 100%;
    }

    .l1009-search input,
    .l1009-search button {
        height: 43px;
    }

    .l1009-nav {
        min-height: 0;
        padding: 5px 0 12px;
        gap: 6px;
    }

    .l1009-nav a {
        min-height: 35px;
        padding: 0 13px;
        font-size: 12px;
    }

    .l1009-global-content {
        min-height: calc(100vh - 190px);
        padding-bottom: 35px;
    }

    .l1009-main {
        padding-top: 20px;
        padding-bottom: 38px;
    }

    .l1009-intro {
        margin-bottom: 16px;
        padding: 28px 20px;
        border-radius: 19px;
    }

    .l1009-intro h1 {
        font-size: 30px;
        letter-spacing: -1.2px;
    }

    .l1009-intro-text {
        margin-top: 13px;
        font-size: 14px;
    }

    .l1009-category {
        padding: 17px;
        border-radius: 15px;
    }

    .l1009-category-title h2,
    .l1009-box h2 {
        font-size: 17px;
    }

    .l1009-bottom-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .l1009-box {
        padding: 17px;
        border-radius: 15px;
    }

}


@media (max-width: 420px) {

    .l1009-search {
        gap: 6px;
    }

    .l1009-search input {
        font-size: 16px;
    }

    .l1009-search button {
        padding: 0 14px;
    }

    .l1009-intro h1 {
        font-size: 27px;
    }

    .l1009-channel {
        min-height: 35px;
        padding: 0 10px;
        font-size: 12px;
    }

    .l1009-rank-item {
        grid-template-columns: 27px minmax(0, 1fr) auto;
    }

}

/* 최근 등록 채널 - 순위 번호 칸 제거 */
.l1009-recent-item {
    grid-template-columns: minmax(0, 1fr) auto;
}

.l1009-recent-item .l1009-rank-name {
    min-width: 0;
}
