/* TUBETAMILS-YOUTUBE (Nov 2026): home grid (tt_home), cards (tt_cards), watch page (tt_watch). */
.tt-page, .tt-watch {
    --tt-red: #E50914; --tt-ink: #0f0f12; --tt-sub: #5f6168; --tt-line: #e6e6ea; --tt-chip: #f1f1f4; --tt-chip-ink: #0f0f12;
    --tt-shadow: rgba(15, 15, 18, .08);
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Noto Sans Tamil", sans-serif;
    color: var(--tt-ink);
}
[data-bs-theme="dark"] .tt-page, [data-bs-theme="dark"] .tt-watch {
    --tt-ink: #f1f1f3; --tt-sub: #a4a6ae; --tt-line: #2a2b31; --tt-chip: #24252b; --tt-chip-ink: #f1f1f3; --tt-shadow: rgba(0, 0, 0, .4);
}
.tt-page { max-width: 2200px; margin: 0 auto; padding: 18px 24px 48px; }
.tt-page a, .tt-watch a { text-decoration: none; color: inherit; }

/* chips */
.tt-chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 18px; scrollbar-width: none; }
.tt-chips::-webkit-scrollbar { display: none; }
.tt-chip { flex: none; padding: 7px 14px; border-radius: 9px; background: var(--tt-chip); color: var(--tt-chip-ink) !important;
    font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap; transition: background .15s; }
.tt-chip:hover { background: color-mix(in srgb, var(--tt-chip) 80%, var(--tt-ink)); }
.tt-chip.on { background: var(--tt-ink); color: #fff !important; }
[data-bs-theme="dark"] .tt-chip.on { color: #0f0f12 !important; }

/* grid */
.tt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 36px 16px; }
.tt-grid + .tt-grid, .tt-shelf + .tt-grid { margin-top: 36px; }
.tt-card { display: block; min-width: 0; }
.tt-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--tt-chip); }
.tt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.tt-card:hover .tt-thumb { border-radius: 4px; transition: border-radius .2s; }
.tt-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .8);
    color: #fff; font-size: 12px; font-weight: 600; line-height: 18px; letter-spacing: .2px; }
.tt-meta { display: flex; gap: 12px; padding-top: 12px; }
.tt-av { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; background: var(--tt-chip); }
.tt-text { display: flex; flex-direction: column; min-width: 0; }
.tt-title { font-size: 16px; font-weight: 600; line-height: 22px; color: var(--tt-ink); display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; word-break: break-word; }
.tt-sub { font-size: 14px; line-height: 20px; color: var(--tt-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* shorts */
.tt-shelf { margin-top: 40px; padding-top: 24px; border-top: 4px solid var(--tt-line); }
.tt-shelf h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; margin: 0 0 16px; color: var(--tt-ink); }
.tt-shelf-icon { width: 22px; height: 22px; border-radius: 50%; background: var(--tt-red); position: relative; }
.tt-shelf-icon::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.tt-shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 210px); gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.tt-shorts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px 12px; }
.tt-short { display: flex; flex-direction: column; min-width: 0; }
.tt-short-img { display: block; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--tt-chip); margin-bottom: 8px; }
.tt-short-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tt-short-title { font-size: 15px; font-weight: 600; line-height: 21px; color: var(--tt-ink); display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 2px; }

.tt-empty { text-align: center; padding: 80px 16px; color: var(--tt-sub); }
.tt-empty h2 { color: var(--tt-ink); font-size: 22px; margin-bottom: 6px; }
.tt-more { height: 48px; }
.tt-more.loading { background: radial-gradient(circle, var(--tt-red) 4px, transparent 5px) center / 18px 18px no-repeat; animation: tt-pulse 1s infinite; }
@keyframes tt-pulse { 50% { opacity: .3; } }

/* watch page */
.tt-watch { display: grid; grid-template-columns: minmax(0, 1fr) 402px; gap: 24px; max-width: 1760px; margin: 0 auto; padding: 24px 24px 48px; }
.tt-player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.tt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tt-wtitle { font-size: 20px; font-weight: 700; line-height: 28px; margin: 12px 0 10px; color: var(--tt-ink); word-break: break-word; }
.tt-wbar { display: flex; align-items: center; gap: 12px; }
.tt-wbar .tt-av { width: 40px; height: 40px; }
.tt-wch { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.tt-wch b { font-size: 16px; color: var(--tt-ink); }
.tt-wch span { font-size: 12px; color: var(--tt-sub); }
.tt-yt { padding: 9px 16px; border-radius: 18px; background: var(--tt-ink); color: #fff !important; font-size: 14px; font-weight: 600; white-space: nowrap; }
[data-bs-theme="dark"] .tt-yt { color: #0f0f12 !important; }
.tt-desc { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--tt-chip); font-size: 14px; line-height: 20px; color: var(--tt-ink); }
.tt-desc-text { white-space: pre-wrap; word-break: break-word; max-height: 60px; overflow: hidden; margin-top: 4px; }
.tt-desc.open .tt-desc-text { max-height: none; }
.tt-desc-more { border: 0; background: none; padding: 4px 0 0; font-weight: 700; font-size: 14px; color: var(--tt-ink); cursor: pointer; }
.tt-legal { font-size: 12px; color: var(--tt-sub); margin-top: 12px; }
.tt-legal a { text-decoration: underline !important; }
.tt-next { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tt-nitem { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 8px; }
.tt-nitem .tt-thumb { border-radius: 8px; }
.tt-nitem .tt-title { font-size: 14px; line-height: 20px; }
.tt-nitem .tt-sub { font-size: 12px; line-height: 18px; }

@media (max-width: 1100px) {
    .tt-watch { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .tt-page { padding: 12px 0 40px; }
    .tt-chips { padding: 4px 12px 14px; }
    .tt-grid { grid-template-columns: 1fr; gap: 24px; }
    .tt-thumb { border-radius: 0; }
    .tt-card:hover .tt-thumb { border-radius: 0; }
    .tt-meta { padding: 10px 12px 0; }
    .tt-shelf { margin-top: 24px; padding: 16px 12px 0; }
    .tt-shelf-row { grid-auto-columns: 46%; }
    .tt-shorts-grid { grid-template-columns: 1fr 1fr; padding: 0 12px; }
    .tt-watch { padding: 0 0 40px; gap: 16px; }
    .tt-player { border-radius: 0; }
    .tt-main > :not(.tt-player) { margin-left: 12px; margin-right: 12px; }
    .tt-wtitle { font-size: 18px; line-height: 25px; }
    .tt-next { padding: 0 12px; }
    .tt-nitem { grid-template-columns: 1fr; }
    .tt-nitem .tt-thumb { border-radius: 12px; }
    .tt-nitem .tt-title { font-size: 15px; }
}
