/* ==========================================================================
   TeraPlayerOnline.com - Unified Global Design System
   Modern Obsidian Dark / Electric Cyan & Azure Aesthetic
   Mobile-First, Ultra-Lightweight, Sub-300ms Performance
   ========================================================================== */

/* Self-hosted DM Sans â€” eliminates render-blocking Google Fonts CDN call */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/assets/fonts/dm-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/assets/fonts/dm-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg-main: #07090e;
    --bg-card: #0f172a;
    --bg-card-alt: #162036;
    --bg-glass: rgba(15, 23, 42, 0.75);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(6, 182, 212, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --cyan-primary: #06b6d4;
    --cyan-hover: #0891b2;
    --blue-primary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --accent-glow: 0 0 25px rgba(6, 182, 212, 0.25);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --font-stack: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.6px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Ambient Glows */
.ambient-glow-1 {
    position: fixed;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(59, 130, 246, 0.06) 40%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.brand-icon svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
    margin-left: 2px;
}

.brand-text span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-gradient);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

/* Main Content Wrap */
.main-wrapper {
    flex: 1;
    position: relative;
    z-index: 1;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 18px 60px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 30px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: var(--cyan-primary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 16px;
    letter-spacing: 0.03em;
}

.hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.9rem;
    }
}

.hero-title .gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 24px;
    font-weight: 400;
}

/* Supported Domains Chip Grid */
.supported-domains-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    margin-bottom: 24px;
}

.domain-chip {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Features Grid */
.features-section {
    margin: 60px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 36px;
}

.section-title {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
}

.feature-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(6, 182, 212, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--cyan-primary);
}

.feature-icon-wrap svg {
    width: 22px;
    height: 22px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Steps / How-To Section */
.steps-section {
    margin: 60px 0;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step-card {
    position: relative;
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.step-card h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* Deep SEO Content Box */
.content-section {
    margin: 60px 0;
    line-height: 1.7;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    margin-bottom: 24px;
}

.content-card h2 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.content-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--cyan-primary);
}

.content-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.content-card ul {
    list-style: none;
    margin: 12px 0 20px;
}

.content-card ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.content-card ul li::before {
    content: "âœ“";
    position: absolute;
    left: 0;
    color: var(--cyan-primary);
    font-weight: 700;
}

/* FAQ Accordions */
.faq-section {
    margin: 60px 0;
}

.faq-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.faq-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
    color: var(--cyan-primary);
    flex-shrink: 0;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 20px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 20px 20px;
}

/* Footer */
.site-footer {
    background: #040508;
    border-top: 1px solid var(--border-subtle);
    padding: 40px 20px 30px;
    margin-top: auto;
}

.footer-container {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--cyan-primary);
}

.footer-disclaimer {
    max-width: 720px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Blog Directory & Article System
   ========================================================================== */
.blog-hero {
    text-align: center;
    padding: 30px 10px 40px;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 30px;
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 30px -8px rgba(6, 182, 212, 0.25);
}

.blog-card-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(6, 182, 212, 0.15);
    color: var(--cyan-primary);
    border: 1px solid rgba(6, 182, 212, 0.3);
    margin-bottom: 12px;
    width: fit-content;
}

.blog-card-tag.tag-downloader {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.blog-card-title {
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.blog-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 18px;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.blog-read-more {
    color: var(--cyan-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Article Layout */
.article-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 0 60px;
}

.article-header {
    margin-bottom: 30px;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.article-breadcrumb a {
    color: var(--cyan-primary);
    text-decoration: none;
}

.article-title {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .article-title {
        font-size: 2.6rem;
    }
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.article-toc {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 28px 0;
}

.article-toc-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.article-toc ul {
    list-style: none;
    padding-left: 0;
}

.article-toc li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.article-toc a {
    color: var(--cyan-primary);
    text-decoration: none;
}

.article-toc a:hover {
    text-decoration: underline;
}

.article-content {
    line-height: 1.8;
    color: #cbd5e1;
    font-size: 1.02rem;
}

.article-content h2 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cyan-primary);
    margin: 26px 0 12px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul, .article-content ol {
    margin: 14px 0 24px 20px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content a {
    color: var(--cyan-primary);
    text-decoration: underline;
    font-weight: 600;
}

.article-content a:hover {
    color: #38bdf8;
}

.callout-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left: 4px solid var(--cyan-primary);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 28px 0;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.callout-box strong {
    color: var(--cyan-primary);
}

/* Sticky Action Banner inside Blog */
.cta-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(22, 32, 54, 0.95) 100%);
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin: 40px 0;
    text-align: center;
    box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.3);
}

.cta-banner h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.cta-banner p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.cta-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-gradient);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.98rem;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.6);
}



/* --- DOWNLOADER COMPONENT STYLES --- */

/* TeraBox Downloader - Mobile-First Responsive Stylesheet */
/* Font is self-hosted via site.css @font-face â€” no render-blocking CDN call */

.tb-dl-container {
    font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    letter-spacing: 0.6px;
    color: #f1f5f9;
    width: 100%;
    max-width: 980px;
    margin: 16px auto;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.tb-dl-container *,
.tb-dl-container *::before,
.tb-dl-container *::after {
    box-sizing: border-box;
    font-family: inherit;
}

.tb-dl-hidden {
    display: none !important;
}

/* Card Container */
.tb-dl-card {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 12px 35px -10px rgba(0, 0, 0, 0.55), 0 0 1px 1px rgba(255, 255, 255, 0.05);
}



/* Input Row */
.tb-dl-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 640px) {
    .tb-dl-input-wrap {
        flex-direction: row;
        align-items: center;
    }
}

.tb-dl-field-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    width: 100%;
}

.tb-dl-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.2s ease;
}

.tb-dl-input {
    width: 100% !important;
    background: rgba(30, 41, 59, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 14px 40px 14px 44px !important;
    color: #f8fafc !important;
    font-size: 15px !important;
    outline: none !important;
    transition: all 0.25s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.tb-dl-input:focus {
    border-color: #a855f7 !important;
    background: rgba(30, 41, 59, 0.95) !important;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.tb-dl-clear-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.tb-dl-clear-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.tb-dl-clear-btn svg {
    width: 16px;
    height: 16px;
}

/* Button Group */
.tb-dl-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

@media (min-width: 640px) {
    .tb-dl-actions {
        width: auto;
    }
}

.tb-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    user-select: none;
    text-decoration: none;
}

.tb-dl-paste-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tb-dl-paste-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-1px);
}

.tb-dl-paste-btn svg {
    width: 17px;
    height: 17px;
}

.tb-dl-fetch-btn {
    background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
    flex: 1;
}

@media (min-width: 640px) {
    .tb-dl-fetch-btn {
        flex: initial;
        min-width: 165px;
    }
}

.tb-dl-fetch-btn:hover {
    background: linear-gradient(135deg, #9333ea 0%, #2563eb 100%);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.55);
    transform: translateY(-1px);
}

.tb-dl-btn-icon {
    width: 18px;
    height: 18px;
}

/* Spinner */
.tb-dl-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: tbDlSpin 0.7s linear infinite;
}

@keyframes tbDlSpin {
    to { transform: rotate(360deg); }
}

/* Paste Alert Toast */
.tb-dl-paste-alert {
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    animation: tbDlFadeIn 0.3s ease;
}

/* Error Box */
.tb-dl-error-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
    color: #fca5a5;
    animation: tbDlFadeIn 0.3s ease;
}

.tb-dl-error-icon {
    width: 22px;
    height: 22px;
    color: #ef4444;
    flex-shrink: 0;
    margin-top: 1px;
}

.tb-dl-error-title {
    font-weight: 600;
    font-size: 14px;
    color: #f87171;
    margin-bottom: 4px;
}

.tb-dl-error-desc {
    font-size: 13.5px;
    line-height: 1.45;
    color: #fecaca;
}

/* Result Card */
.tb-dl-result-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.65), 0 0 15px rgba(168, 85, 247, 0.15);
    animation: tbDlSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tb-dl-result-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 640px) {
    .tb-dl-result-grid {
        flex-direction: row;
        align-items: center;
    }
}

.tb-dl-thumb-wrap {
    position: relative;
    width: 100%;
    max-width: 260px;
    height: 155px;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .tb-dl-thumb-wrap {
        margin: 0;
    }
}

.tb-dl-thumb-placeholder {
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%) !important;
}

.tb-dl-thumb-placeholder .tb-dl-thumb-overlay svg {
    width: 48px;
    height: 48px;
    color: #94a3b8;
}

.tb-dl-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.tb-dl-thumb-wrap:hover .tb-dl-thumb {
    transform: scale(1.04);
}

.tb-dl-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0.85;
}

.tb-dl-thumb-overlay svg {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.tb-dl-info-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tb-dl-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tb-dl-badge-item {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.tb-dl-badge-size {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.tb-dl-badge-dur {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tb-dl-badge-quality {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.tb-dl-file-title {
    font-size: 18px;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
    line-height: 1.35;
    word-break: break-word;
}

/* Action Buttons Row */
.tb-dl-cta-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

@media (min-width: 500px) {
    .tb-dl-cta-row {
        flex-direction: row;
    }
}

.tb-dl-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.tb-dl-download-action {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    flex: 1.2;
}

.tb-dl-download-action:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
}

.tb-dl-download-action svg,
.tb-dl-stream-action svg {
    width: 20px;
    height: 20px;
}

.tb-dl-stream-action {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex: 1;
}

.tb-dl-stream-action:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Live Transfer Feedback Panel */
.tb-dl-transfer-status {
    margin-top: 16px;
    padding: 16px 18px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: tbDlFadeIn 0.3s ease;
}

.tb-dl-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tb-dl-status-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tb-dl-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: tbPulseDot 1.4s infinite ease-in-out;
}

.tb-dl-status-dot.tb-dl-dot-success {
    background: #10b981 !important;
    box-shadow: 0 0 10px #10b981 !important;
    animation: none !important;
}

.tb-dl-status-dot.tb-dl-dot-error {
    background: #ef4444 !important;
    box-shadow: 0 0 10px #ef4444 !important;
    animation: none !important;
}

@keyframes tbPulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.tb-dl-status-label {
    font-size: 13.5px;
    font-weight: 500;
    color: #e2e8f0;
}

.tb-dl-status-percent {
    font-size: 15px;
    font-weight: 700;
    color: #38bdf8;
    font-variant-numeric: tabular-nums;
}

.tb-dl-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.tb-dl-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 50%, #10b981 100%);
    border-radius: 6px;
    transition: width 0.15s ease-out;
}

.tb-dl-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 2px;
}

.tb-dl-metric-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tb-dl-metric-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.tb-dl-metric-val {
    font-size: 12.5px;
    font-weight: 600;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tb-dl-direct-row {
    text-align: right;
    margin-top: 2px;
}

.tb-dl-direct-link {
    font-size: 11.5px;
    color: #94a3b8;
    text-decoration: underline;
    transition: color 0.2s;
}

.tb-dl-direct-link:hover {
    color: #38bdf8;
}

@media (max-width: 600px) {
    .tb-dl-metrics-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

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

@keyframes tbDlSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
