:root {
    --tn-bg-primary: #0a0a0a;
    --tn-bg-secondary: #111111;
    --tn-bg-card: #1b1b1b;
    --tn-bg-muted: #222222;
    --tn-text-primary: #ffffff;
    --tn-text-secondary: #b4b4bd;
    --tn-text-muted: #8a8a95;
    --tn-border: rgba(255, 255, 255, 0.1);
    --tn-accent: #6366f1;
    --tn-accent-2: #8b5cf6;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--tn-bg-primary);
    color: var(--tn-text-primary);
    overflow-x: hidden;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

a {
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--tn-accent);
    outline-offset: 2px;
}

/* Header */
.tn-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(10, 10, 10, 0.92);
    border-bottom: 1px solid var(--tn-border);
    backdrop-filter: blur(14px);
    transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tn-header.scrolled {
    background: rgba(10, 10, 10, 0.98);
    border-bottom-color: rgba(255, 255, 255, .15);
    box-shadow: 0 8px 26px rgba(0, 0, 0, .35);
}

.tn-logo-wrapper {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.tn-logo-circle {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--tn-accent), var(--tn-accent-2));
}

.tn-logo-badge {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid var(--tn-bg-primary);
    display: grid;
    place-items: center;
}

.tn-logo-text {
    font-weight: 800;
    color: #fff;
}

.tn-logo-char {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.tn-logo-badge-icon {
    font-size: .625rem;
    color: #fff;
}

.tn-logo-text-main {
    font-size: 1.5rem;
}

.tn-logo-subtitle {
    font-size: .625rem;
    letter-spacing: .15em;
    color: var(--tn-text-muted);
}

.tn-btn-close-invert {
    filter: invert(1);
}

.tn-logo-circle-sm {
    width: 36px;
    height: 36px;
}

.tn-logo-char-sm {
    font-size: 1.25rem;
}

.tn-logo-badge-sm {
    width: 16px;
    height: 16px;
}

.tn-logo-badge-icon-sm {
    font-size: .5rem;
}

.tn-logo-text-sm {
    font-size: 1.25rem;
}

.tn-text-muted {
    color: var(--tn-text-muted);
}

.tn-leading-relaxed {
    line-height: 1.7;
}

.tn-nav-link {
    color: var(--tn-text-secondary);
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .75rem 0;
    border-bottom: 2px solid transparent;
}

.tn-nav-link:hover {
    color: #fff;
    border-bottom-color: var(--tn-accent);
}

.tn-nav-link:focus-visible {
    border-bottom-color: var(--tn-accent);
}

.tn-header-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--tn-border);
    background: var(--tn-bg-card);
    color: var(--tn-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-header-action:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .24);
}

.tn-offcanvas {
    background: var(--tn-bg-card);
    border-left: 1px solid var(--tn-border);
}

.tn-mobile-link {
    display: block;
    padding: .75rem .9rem;
    border-radius: .5rem;
    color: var(--tn-text-secondary);
}

.tn-mobile-link:hover {
    color: #fff;
    background: var(--tn-bg-muted);
}

/* Hero Carousel */
.tn-hero {
    position: relative;
}

.tn-hero .carousel-item {
    height: min(72vh, 640px);
    min-height: 420px;
}

.tn-hero .carousel-item > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.58);
}

.tn-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(10, 10, 10, .9) 0%, rgba(10, 10, 10, .55) 45%, rgba(10, 10, 10, .15) 100%);
}

.tn-hero .carousel-caption {
    inset: 0;
    right: 0;
    left: 0;
    bottom: 0;
    padding: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    text-align: left;
}

.tn-hero-content {
    max-width: 780px;
    padding: 1rem 0;
}

.tn-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .85rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.tn-hero-title {
    margin: .8rem 0 .9rem;
    font-size: clamp(2rem, 5.2vw, 4rem);
    line-height: 1.08;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .45);
}

.tn-hero-description {
    margin: 0 0 1.3rem;
    color: #d7d7dd;
    max-width: 640px;
}

.tn-btn-hero {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.25rem;
    border-radius: .65rem;
    border: 0;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--tn-accent), var(--tn-accent-2));
}

.tn-hero .carousel-indicators {
    margin-bottom: 1rem;
}

.tn-hero .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.tn-hero .carousel-control-prev,
.tn-hero .carousel-control-next {
    width: 4rem;
    opacity: .85;
}

.tn-hero .carousel-control-prev:hover,
.tn-hero .carousel-control-next:hover {
    opacity: 1;
}

/* Breaking News */
.tn-breaking-news {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 45%, #f97316 100%);
    box-shadow: 0 1px 8px rgba(0, 0, 0, .25);
}

.tn-breaking-inner {
    min-height: 58px;
}

.tn-breaking-badge {
    background: rgba(0, 0, 0, .26);
    color: #fff;
    border-radius: .5rem;
    padding: .42rem .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.tn-breaking-scroll {
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tn-breaking-scroll::-webkit-scrollbar {
    display: none;
}

.tn-breaking-chip {
    display: inline-flex;
    white-space: nowrap;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .14);
    padding: .4rem .8rem;
    border-radius: .5rem;
    font-size: .84rem;
    transition: background-color .2s ease, border-color .2s ease;
}

.tn-breaking-chip:hover {
    background: rgba(255, 255, 255, .24);
    border-color: rgba(255, 255, 255, .4);
}

/* Search */
.tn-search-wrap {
    position: relative;
}

.tn-search-input {
    padding: .95rem 7.4rem .95rem 2.8rem;
    background: var(--tn-bg-card);
    border: 1px solid var(--tn-border);
    color: var(--tn-text-primary);
    border-radius: .75rem;
}

.tn-search-input:focus {
    color: var(--tn-text-primary);
    background: var(--tn-bg-card);
    border-color: var(--tn-accent);
    box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .15);
}

.tn-search-icon {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tn-text-muted);
}

.tn-search-btn {
    position: absolute;
    right: .45rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: .6rem;
    padding: .6rem 1rem;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--tn-accent), var(--tn-accent-2));
}

.tn-search-btn:hover {
    filter: brightness(1.08);
}

/* Content */
.tn-section-header {
    border-left: 4px solid var(--tn-accent);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.tn-section-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
}

.tn-section-link {
    color: var(--tn-accent);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .76rem;
    font-weight: 700;
}

.tn-card,
.tn-sidebar-widget {
    background: var(--tn-bg-card);
    border: 1px solid var(--tn-border);
    border-radius: .7rem;
}

.tn-card {
    overflow: hidden;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.tn-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, .18);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .25);
}

.tn-card-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.tn-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-card-badge {
    position: absolute;
    left: .75rem;
    top: .75rem;
    background: linear-gradient(135deg, var(--tn-accent), var(--tn-accent-2));
    color: #fff;
    padding: .3rem .65rem;
    border-radius: .45rem;
    font-size: .7rem;
    font-weight: 700;
}

.tn-card-body {
    padding: 1rem;
}

.tn-card-title {
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tn-card-text,
.tn-mini-post-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tn-card-text {
    color: var(--tn-text-secondary);
    font-size: .9rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.tn-card-title a {
    color: #fff;
    transition: color .2s ease;
}

.tn-card-title a:hover {
    color: #c7c9ff;
}

.tn-card-img-fill {
    height: 100%;
    aspect-ratio: auto;
}

.tn-line-clamp-3 {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.tn-icon-accent {
    color: var(--tn-accent);
}

.tn-alert-muted {
    background: var(--tn-bg-card);
    border: 1px solid var(--tn-border);
    color: var(--tn-text-muted);
}

.tn-card-meta,
.tn-mini-post-date {
    color: var(--tn-text-muted);
    font-size: .8rem;
}

.tn-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.tn-sidebar-widget {
    padding: 1rem;
}

.tn-sidebar-widget + .tn-sidebar-widget {
    margin-top: 1rem;
}

.tn-sidebar-header {
    padding-bottom: .8rem;
    margin-bottom: .8rem;
    border-bottom: 1px solid var(--tn-border);
}

.tn-sidebar-title {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.tn-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem .65rem;
    color: var(--tn-text-secondary);
    border-radius: .45rem;
}

.tn-category-item:hover {
    color: #fff;
    background: var(--tn-bg-muted);
}

.tn-category-count {
    color: #fff;
    font-size: .72rem;
    border-radius: .4rem;
    padding: .2rem .45rem;
    background: rgba(255, 255, 255, .12);
}

.tn-mini-post {
    display: flex;
    gap: .75rem;
    padding: .75rem 0;
}

.tn-mini-post:not(:last-child) {
    border-bottom: 1px solid var(--tn-border);
}

.tn-mini-post-img {
    width: 68px;
    height: 68px;
    border-radius: .5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.tn-mini-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-mini-post-title {
    color: #fff;
    font-size: .86rem;
    font-weight: 600;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Footer */
.tn-footer {
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--tn-border);
    background: var(--tn-bg-secondary);
}

.tn-footer-title {
    color: #fff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .86rem;
    font-weight: 700;
}

.tn-footer-link {
    color: var(--tn-text-secondary);
    display: block;
    padding: .35rem 0;
}

.tn-footer-link:hover {
    color: #fff;
}

.tn-footer-social {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--tn-border);
    color: var(--tn-text-secondary);
}

.tn-footer-social:hover {
    color: #fff;
    border-color: var(--tn-accent);
}

.tn-footer-bottom {
    margin-top: 2rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--tn-border);
    color: var(--tn-text-muted);
    font-size: .85rem;
    text-align: center;
}

.tn-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, .22);
    border-top-color: var(--tn-accent);
    border-radius: 50%;
    animation: tn-spin .8s linear infinite;
}

.tn-loading-screen {
    min-height: 100vh;
}

.tn-loading-page {
    min-height: 60vh;
}

.tn-post-hero-image {
    max-height: 440px;
    object-fit: cover;
}

@keyframes tn-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 991.98px) {
    .tn-hero .carousel-item {
        min-height: 360px;
        height: 60vh;
    }

    .tn-hero-title {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
    }

    .tn-hero-description {
        font-size: .95rem;
    }

    .tn-section-title {
        font-size: 1.25rem;
    }

    .tn-footer {
        margin-top: 3rem;
    }
}

@media (max-width: 767.98px) {
    .tn-hero .carousel-item {
        min-height: 320px;
        height: 66vh;
    }

    .tn-hero .carousel-caption {
        align-items: flex-end;
    }

    .tn-hero-content {
        padding-bottom: 2.5rem;
    }

    .tn-hero-description {
        margin-bottom: 1rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }

    .tn-hero .carousel-control-prev,
    .tn-hero .carousel-control-next {
        width: 2.5rem;
    }

    .tn-card-meta {
        gap: .5rem;
        font-size: .75rem;
    }

    .tn-category-item {
        padding: .55rem .6rem;
    }

    .tn-post-hero-image {
        max-height: 280px;
    }
}

@media (max-width: 575.98px) {
    .tn-search-input {
        padding-right: 5.8rem;
    }

    .tn-search-btn {
        padding: .55rem .75rem;
    }

    .tn-section-header {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .tn-breaking-inner {
        min-height: 52px;
    }

    .tn-breaking-badge {
        font-size: .65rem;
        padding: .35rem .65rem;
    }

    .tn-card-body {
        padding: .9rem;
    }

    .tn-footer {
        padding-top: 2.4rem;
    }
}

/* Category/Post pages */
.tn-page-hero {
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
}

.tn-page-title {
    font-size: clamp(1.6rem, 4.5vw, 3rem);
    line-height: 1.14;
    font-weight: 800;
    margin: 0;
}

.tn-breadcrumb {
    --bs-breadcrumb-divider-color: var(--tn-text-muted);
    --bs-breadcrumb-item-active-color: var(--tn-text-secondary);
}

.tn-breadcrumb a {
    color: var(--tn-text-secondary);
}

.tn-breadcrumb a:hover {
    color: #fff;
}

.pagination .page-link {
    background: var(--tn-bg-card);
    border-color: var(--tn-border);
    color: var(--tn-text-secondary);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--tn-accent), var(--tn-accent-2));
    border-color: transparent;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: var(--tn-bg-muted);
    color: var(--tn-text-muted);
}

.tn-article-content {
    color: var(--tn-text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.tn-article-content h1,
.tn-article-content h2,
.tn-article-content h3,
.tn-article-content h4,
.tn-article-content h5,
.tn-article-content h6 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: .8rem;
    line-height: 1.3;
}

.tn-article-content p {
    margin-bottom: 1rem;
}

.tn-article-content img {
    max-width: 100%;
    border-radius: .6rem;
    margin: 1rem 0;
}

.tn-article-content table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.tn-article-content th,
.tn-article-content td {
    border: 1px solid var(--tn-border);
    padding: .55rem .65rem;
}

.tn-article-content pre,
.tn-article-content code {
    background: #111;
    color: #e7e7f0;
    border-radius: .4rem;
}

.tn-article-content pre {
    padding: .85rem 1rem;
    overflow: auto;
}

.tn-article-content blockquote {
    border-left: 4px solid var(--tn-accent);
    padding-left: 1rem;
    color: #d2d2dc;
    margin: 1rem 0;
}