:root {
    --th-background: #060708;
    --th-background-alt: #0b0c10;
    --th-surface: rgba(20, 21, 28, 0.78);
    --th-surface-strong: rgba(24, 26, 34, 0.92);
    --th-surface-soft: rgba(28, 30, 39, 0.75);
    --th-border: rgba(255, 255, 255, 0.08);
    --th-border-strong: rgba(255, 255, 255, 0.16);
    --th-text-primary: #f8f9fb;
    --th-text-secondary: #a5adbe;
    --th-text-tertiary: #6c7283;
    --th-primary: #f8f9fb;
    --th-primary-rgb: 248, 249, 251;
    --th-secondary: #facc15;
    --th-secondary-rgb: 250, 204, 21;
    --th-gradient: linear-gradient(120deg, #facc15 0%, #f97316 45%, #f43f5e 100%);
    --th-success: #34d399;
    --th-danger: #f87171;
    --th-warning: #fbbf24;
    --th-font-family: 'Inter', 'Manrope', 'Segoe UI', sans-serif;
    --th-font-display: 'Space Grotesk', 'Manrope', sans-serif;
    --th-radius-xl: 28px;
    --th-radius-lg: 22px;
    --th-radius-md: 16px;
    --th-radius-sm: 12px;
    --th-shadow-soft: 0 28px 80px rgba(0, 0, 0, 0.55);
    --th-shadow-ring: 0 0 0 1px rgba(255, 255, 255, 0.06);

    --rl-purple-rgb: 128, 90, 213;
    --rl-purple: #805ad5;
    --rl-pink-rgb: 236, 72, 153;
    --rl-pink: #ec4899;
    --rl-dark-bg: var(--th-background);
    --rl-dark-bg-sidebar: rgba(10, 11, 18, 0.92);
    --rl-dark-bg-content: rgba(8, 9, 16, 0.95);
    --rl-dark-bg-card: rgba(20, 22, 32, 0.85);
    --rl-text-light: var(--th-text-primary);
    --rl-text-muted: var(--th-text-secondary);
    --rl-border-dark: rgba(255, 255, 255, 0.1);
    --rl-border-light-translucent: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--th-font-family);
    background: radial-gradient(circle at 12% -10%, rgba(250, 204, 21, 0.22), transparent 42%),
                radial-gradient(circle at 82% 0%, rgba(244, 63, 94, 0.18), transparent 46%),
                radial-gradient(circle at 50% 100%, rgba(96, 165, 250, 0.14), transparent 58%),
                linear-gradient(180deg, #040405 0%, #08090d 100%);
    color: var(--th-text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.thirai-immersive {
    background: linear-gradient(180deg, rgba(4,5,7,1) 0%, rgba(5,6,10,1) 100%);
}

a {
    color: inherit;
}

a:hover,
a:focus {
    color: #fff;
}

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

.thirai-glass {
    background: var(--th-surface);
    border-radius: var(--th-radius-lg);
    border: 1px solid var(--th-border);
    box-shadow: var(--th-shadow-soft);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    position: relative;
}

.thirai-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.thirai-card {
    background: var(--th-surface-soft);
    border-radius: var(--th-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.thirai-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-6px);
}

.thirai-surface-border {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--th-radius-sm);
    background: rgba(12, 14, 20, 0.72);
}


.btn-thirai-primary {
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.98) 0%, rgba(239, 245, 255, 0.98) 100%);
    color: #050608;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 16px 40px rgba(249, 250, 251, 0.16);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.btn-thirai-primary:hover,
.btn-thirai-primary:focus-visible {
    transform: translateY(-4px);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5ff 100%);
    box-shadow: 0 28px 55px rgba(249, 250, 251, 0.32);
    color: #050608;
}

.btn-thirai-primary:active {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #e7ecf5 0%, #dfe6f4 100%);
    box-shadow: 0 18px 36px rgba(249, 250, 251, 0.24);
    color: #050608;
}

.btn-thirai-outline {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--th-text-primary);
    border-radius: 999px;
    padding: 0.85rem 1.9rem;
    font-weight: 600;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.btn-thirai-outline:hover,
.btn-thirai-outline:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
}

.btn-thirai-outline:active {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.btn-thirai-primary:focus-visible,
.btn-thirai-outline:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(250, 204, 21, 0.25);
}

.badge-thirai {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--th-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.navbar-thirai {
    background: rgba(5, 6, 9, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding-block: 1rem;
}

.navbar-thirai .navbar-brand {
    font-family: var(--th-font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.navbar-thirai .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.navbar-thirai .navbar-nav .nav-link {
    color: var(--th-text-secondary);
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.75rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.navbar-thirai .navbar-nav .nav-link:hover,
.navbar-thirai .navbar-nav .nav-link.active {
    color: #fff;
    transform: translateY(-1px);
}

.navbar-thirai .dropdown-menu {
    background: rgba(17, 18, 25, 0.94);
    border-radius: var(--th-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    padding: 1rem;
}

.navbar-thirai .dropdown-item {
    color: var(--th-text-secondary);
    border-radius: var(--th-radius-sm);
    padding: 0.55rem 0.85rem;
}

.navbar-thirai .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.section-heading {
    font-size: clamp(2.1rem, 3vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--th-text-primary);
    font-family: var(--th-font-display);
}

.section-subtitle {
    color: var(--th-text-secondary);
    max-width: 640px;
}

.hero-title {
    font-family: var(--th-font-display);
    font-size: clamp(3rem, 5vw, 4.8rem);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    color: var(--th-text-secondary);
    font-size: 1.1rem;
    max-width: 560px;
    font-family: var(--th-font-display);
}

.hero-highlight {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    padding-inline: 0.3em;
    border-radius: 0.45em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.thirai-metric {
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: rgba(17, 18, 25, 0.72);
    border-radius: var(--th-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.thirai-metric h3 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #fff;
}

.thirai-metric p {
    color: var(--th-text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.form-control-thirai {
    background: rgba(14, 16, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--th-radius-sm);
    padding: 0.95rem 1rem;
    color: var(--th-text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-thirai:focus {
    border-color: rgba(250, 204, 21, 0.65);
    box-shadow: 0 0 0 0.2rem rgba(250, 204, 21, 0.12);
    outline: none;
    background: rgba(18, 20, 30, 0.95);
}

textarea.form-control-thirai {
    min-height: 160px;
    resize: vertical;
}

.thirai-divider {
    border: none;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(250, 204, 21, 0.55), rgba(255, 255, 255, 0));
}

footer.thirai-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.5rem 0;
    background: linear-gradient(180deg, rgba(6,8,12,0.95), rgba(6,8,12,0.85));
    color: var(--th-text-secondary);
}

footer.thirai-footer a {
    color: var(--th-text-secondary);
    text-decoration: none;
}

footer.thirai-footer a:hover {
    color: #fff;
}

/* Homepage specific */
.hero-intro {
    position: relative;
    padding: 8.5rem 0 6rem;
    overflow: hidden;
}

.hero-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 50% 10%, rgba(255, 153, 102, 0.6) 0%, rgba(255, 102, 0, 0.35) 22%, rgba(34, 44, 84, 0.7) 44%, rgba(5, 6, 12, 0.95) 72%);
    opacity: 0.95;
    z-index: 0;
}

.hero-intro::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 50% 85%, rgba(37, 99, 235, 0.4) 0%, rgba(15, 23, 42, 0) 60%);
    mix-blend-mode: screen;
    z-index: 0;
}

.hero-intro .container {
    position: relative;
    z-index: 1;
}

.hero-spotlight {
    background: transparent;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    align-items: center;
    max-width: 780px;
    margin: 0 auto 3rem;
    width: 100%;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.05rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: var(--th-font-display);
    color: var(--th-text-primary);
}

.hero-title-highlight {
    background: linear-gradient(90deg, #facc15 0%, #f97316 40%, #f43f5e 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.25rem;
    justify-content: center;
}

.hero-copy .hero-console {
    width: 100%;
    margin-top: 0.5rem;
}

.hero-console {
    margin: 0 auto;
    max-width: 720px;
    background: rgba(10, 12, 22, 0.92);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 45px 120px rgba(0, 0, 0, 0.55);
    padding: 2rem 2.5rem 2.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-family: var(--th-font-display);
}

.hero-console-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hero-console-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.3), rgba(244, 63, 94, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.hero-console-tabs {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.35rem;
}

.hero-console-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--th-text-secondary);
}

.hero-console-tab.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.hero-console-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--th-text-secondary);
}

.hero-console-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.hero-console-input {
    background: rgba(4, 5, 12, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 1.5rem 1.75rem;
    color: #fff;
    font-size: 1.1rem;
    min-height: 150px;
    resize: vertical;
    outline: none;
}

.hero-console-input:focus {
    border-color: rgba(250, 204, 21, 0.45);
    box-shadow: 0 0 0 0.25rem rgba(250, 204, 21, 0.1);
    background: rgba(8, 10, 20, 0.85);
}

.hero-console-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.hero-console-feedback {
    font-size: 0.85rem;
    font-family: var(--th-font-display);
    margin-top: -0.5rem;
}

.hero-console-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.hero-console-meta {
    font-size: 0.85rem;
    color: var(--th-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 3rem;
}

.hero-metric {
    min-width: 200px;
    padding: 1.1rem 1.4rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.hero-metric-value {
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--th-font-display);
}

.hero-metric-label {
    font-size: 0.85rem;
    color: var(--th-text-secondary);
}

.hero-metric:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(250, 204, 21, 0.35);
}

.module-section {
    padding: 5rem 0 3rem;
}

.module-card {
    background: rgba(18, 20, 28, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--th-radius-lg);
    padding: 2.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.module-card h3 {
    font-family: var(--th-font-display);
    font-weight: 600;
    font-size: 1.65rem;
}

.module-card p {
    color: var(--th-text-secondary);
    margin-bottom: 0;
}

.module-card .module-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.module-card:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.32);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.46);
}

.feature-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

.feature-highlight {
    background: rgba(14, 16, 22, 0.88);
    border-radius: var(--th-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.9rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    height: 100%;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-highlight:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.35);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(250, 204, 21, 0.14);
    color: #facc15;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    font-size: 1.35rem;
}

.workflow-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .workflow-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

.workflow-step {
    background: rgba(15, 17, 25, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--th-radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.workflow-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(250, 204, 21, 0.14);
    border: 1px solid rgba(250, 204, 21, 0.3);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #facc15;
    margin-bottom: 1.1rem;
}

.workflow-step p {
    color: var(--th-text-secondary);
}

.pricing-board {
    margin-top: 3rem;
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .pricing-board {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.plan-card {
    background: rgba(15, 16, 22, 0.94);
    border-radius: var(--th-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.plan-card.featured {
    border-color: rgba(250, 204, 21, 0.45);
    box-shadow: 0 28px 70px rgba(250, 204, 21, 0.18);
}

.plan-card h3 {
    font-family: var(--th-font-display);
    font-size: 1.6rem;
}

.plan-price {
    font-size: 2.8rem;
    font-weight: 700;
    font-family: var(--th-font-display);
}

.plan-price small {
    font-size: 0.9rem;
    color: var(--th-text-secondary);
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.plan-card li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    color: var(--th-text-secondary);
    font-size: 0.95rem;
}

.plan-card li i {
    color: #facc15;
    margin-top: 0.2rem;
}

.plan-card:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.32);
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.46);
}

.cta-panel {
    background: linear-gradient(135deg, rgba(15, 16, 22, 0.9), rgba(20, 22, 32, 0.95));
    border-radius: calc(var(--th-radius-xl) + 6px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3.4rem;
    text-align: center;
    box-shadow: 0 36px 80px rgba(0, 0, 0, 0.48);
}

.cta-panel p {
    color: var(--th-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 991.98px) {
    .hero-intro {
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-console {
        margin-top: 2.5rem;
        padding: 1.75rem;
    }

    .hero-console-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-console-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .hero-console {
        padding: 1.4rem;
        border-radius: 22px;
    }

    .hero-console-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .hero-console-tabs {
        width: 100%;
        justify-content: space-between;
    }

    .hero-console-tab {
        flex: 1 1 auto;
        justify-content: center;
        font-size: 0.8rem;
    }

    .hero-console-input {
        font-size: 1rem;
        padding: 1.2rem 1.25rem;
    }

    .hero-console-footer {
        align-items: stretch;
    }

    .hero-metric {
        min-width: 100%;
    }
}

/* Footer layout adjustments */
footer .footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Task queue */
#task-queue-panel {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 340px;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1100;
}

.task-queue-container {
    background: rgba(14, 16, 24, 0.92);
    border-radius: var(--th-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.task-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.task-queue-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.task-queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem 1.1rem;
    overflow-y: auto;
}

.task-item {
    border-radius: 14px;
    background: rgba(18, 20, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

.task-item-header {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: baseline;
}

.task-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.task-item-status {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.task-item-status.processing { color: rgba(250, 204, 21, 0.8); }
.task-item-status.completed { color: var(--th-success); }
.task-item-status.error { color: var(--th-danger); }

.task-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--th-gradient);
    transition: width 0.3s ease;
}

.task-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.task-item-actions {
    display: flex;
    gap: 0.35rem;
}

.task-item-actions button,
.task-item-actions a {
    border-radius: 999px;
    border: none;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.task-action-primary {
    background: rgba(250, 204, 21, 0.16);
    color: #facc15;
}

.task-action-primary:hover {
    background: rgba(250, 204, 21, 0.28);
}

.task-action-ghost {
    background: transparent;
    color: var(--th-text-secondary);
}

.task-action-ghost:hover {
    color: #fff;
}

/* Auth modal adjustments */
.modal-content {
    background: rgba(12, 14, 20, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--th-radius-lg);
    color: var(--th-text-primary);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
}

.modal-header,
.modal-footer {
    border-color: rgba(255, 255, 255, 0.08);
}

#signupModalHomepage .modal-content,
#loginModalHomepage .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

.thirai-modal-pane {
    position: relative;
    background: radial-gradient(140% 120% at 20% 10%, rgba(250, 204, 21, 0.2), transparent 45%),
                radial-gradient(160% 160% at 80% 0%, rgba(244, 63, 94, 0.18), transparent 52%),
                rgba(10, 12, 22, 0.92);
    border-radius: var(--th-radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
    padding: 2.75rem 2.5rem;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    overflow: hidden;
}

.thirai-modal-pane::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.thirai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.thirai-modal-header .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.65;
    transition: opacity 0.3s ease;
}

.thirai-modal-header .btn-close:hover {
    opacity: 1;
}

.thirai-modal-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.thirai-modal-content form {
    display: grid;
    gap: 0.85rem;
}

.thirai-modal-input {
    width: 100%;
    background: rgba(5, 6, 12, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--th-radius-sm);
    padding: 0.95rem 1.1rem;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.thirai-modal-input:focus {
    outline: none;
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(250, 204, 21, 0.16);
    background: rgba(10, 12, 24, 0.88);
}

.thirai-modal-button {
    background: #f9fafb;
    color: #050608;
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.1rem;
    font-weight: 600;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
    box-shadow: 0 16px 40px rgba(249, 250, 251, 0.16);
}

.thirai-modal-button:hover,
.thirai-modal-button:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 26px 60px rgba(249, 250, 251, 0.25);
    outline: none;
}

.thirai-modal-outline-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    border-radius: 999px;
    padding: 0.9rem 1.1rem;
    font-weight: 600;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.thirai-modal-outline-button:hover,
.thirai-modal-outline-button:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.32);
    transform: translateY(-3px);
    outline: none;
}

.thirai-modal-helper {
    color: var(--th-text-secondary);
    font-size: 0.95rem;
}

.thirai-text-link {
    background: none;
    border: none;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.thirai-text-link:hover,
.thirai-text-link:focus-visible {
    color: var(--th-secondary);
    outline: none;
}

.auth-message-modal {
    min-height: 1.25rem;
}

@media (max-width: 575.98px) {
    .thirai-modal-pane {
        padding: 2rem 1.5rem;
    }

    .thirai-modal-content form {
        gap: 0.75rem;
    }
}

.form-text.text-danger {
    color: #f87171 !important;
}

/* Video cards */
.video-card {
    background: rgba(12, 14, 20, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--th-radius-md);
    color: var(--th-text-primary);
}

.video-card:hover {
    border-color: rgba(250, 204, 21, 0.32);
}

/* Pricing badges */
.pricing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
}

/* Tables */
.table-dark th,
.table-dark td {
    border-color: rgba(255, 255, 255, 0.08);
}

.table-dark {
    --bs-table-bg: rgba(12, 14, 20, 0.9);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.04);
}

/* Utility */
.shadow-ring {
    box-shadow: var(--th-shadow-ring);
}

.fade-gradient-top {
    position: relative;
    overflow: hidden;
}

.fade-gradient-top::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(6,7,10,0) 0%, rgba(6,7,10,0.8) 60%, rgba(6,7,10,1) 100%);
    pointer-events: none;
}
