/* Techylist-inspired light portal theme (variant-03) */
:root {
    --tl-primary: #1e73be;
    --tl-primary-dark: #135a96;
    --tl-accent: #039be5;
    --tl-success: #00a32a;
    --tl-bg: #f0f0f0;
    --tl-surface: #ffffff;
    --tl-border: #e2e8f0;
    --tl-text: #222222;
    --tl-muted: #575760;
    --tl-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
    --tl-radius: 8px;
    --tl-font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body.tl-body {
    margin: 0;
    font-family: var(--tl-font);
    background: var(--tl-bg);
    color: var(--tl-text);
    line-height: 1.6;
}

a { color: var(--tl-primary); text-decoration: none; }
a:hover { color: var(--tl-accent); }

.tl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.tl-header {
    background: var(--tl-surface);
    border-bottom: 1px solid var(--tl-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.tl-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    flex-wrap: wrap;
}

.tl-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--tl-primary);
    letter-spacing: -0.02em;
}

.tl-logo:hover { color: var(--tl-accent); }

.tl-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.tl-nav a {
    color: var(--tl-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: 6px;
}

.tl-nav a:hover,
.tl-nav a.active {
    background: rgba(30, 115, 190, 0.08);
    color: var(--tl-primary);
}

.tl-search-form {
    display: flex;
    max-width: 280px;
    flex: 1;
    min-width: 180px;
}

.tl-search-form input {
    flex: 1;
    border: 1px solid var(--tl-border);
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 10px 14px;
    font-size: 0.9rem;
}

.tl-search-form button {
    background: var(--tl-primary);
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    padding: 0 16px;
    cursor: pointer;
}

.tl-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--tl-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .tl-menu-toggle { display: block; }
    .tl-nav-wrap:not(.open) .tl-nav { display: none; }
    .tl-nav-wrap.open .tl-nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding-top: 12px;
    }
    .tl-header-inner { flex-direction: column; align-items: stretch; }
    .tl-search-form { max-width: none; }
}

/* Breadcrumb */
.tl-breadcrumb {
    background: var(--tl-surface);
    border-bottom: 1px solid var(--tl-border);
    padding: 12px 0;
    font-size: 0.875rem;
    color: var(--tl-muted);
}

.tl-breadcrumb a { color: var(--tl-muted); }
.tl-breadcrumb a:hover { color: var(--tl-primary); }
.tl-breadcrumb .sep { margin: 0 8px; color: #b2b2be; }

/* Card */
.tl-card {
    background: var(--tl-surface);
    border-radius: var(--tl-radius);
    box-shadow: var(--tl-shadow);
    border: 1px solid var(--tl-border);
}

/* Section */
.tl-section { padding: 28px 0; }

.tl-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--tl-text);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tl-primary);
    display: inline-block;
}

.tl-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.tl-view-all {
    font-weight: 600;
    color: var(--tl-primary);
    font-size: 0.9rem;
}

/* Home hero strip */
.tl-hero-strip {
    background: linear-gradient(135deg, #1e73be 0%, #039be5 100%);
    color: #fff;
    padding: 32px 0;
    margin-bottom: 8px;
}

.tl-hero-strip h1 {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
}

.tl-hero-strip p {
    margin: 0;
    opacity: 0.92;
    max-width: 600px;
}

/* App card - grid */
.tl-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.tl-app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: var(--tl-surface);
    border: 1px solid var(--tl-border);
    border-radius: var(--tl-radius);
    box-shadow: var(--tl-shadow);
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tl-app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(30, 115, 190, 0.15);
    color: inherit;
}

.tl-app-card img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 10px;
}

.tl-app-card .name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tl-app-card .ver {
    font-size: 0.75rem;
    color: var(--tl-muted);
    margin-top: 4px;
}

/* App row - horizontal (home featured) */
.tl-app-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}

.tl-app-row .tl-app-card {
    min-width: 130px;
    scroll-snap-align: start;
}

/* Download section (detail) */
.tl-download-section { padding: 24px 0 0; }

.tl-download-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
}

.tl-download-title {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 260px;
}

.tl-app-icon-lg {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--tl-shadow);
}

.tl-download-title h1 {
    margin: 0 0 6px;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
}

.tl-badge-apk {
    display: inline-block;
    background: var(--tl-success);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 6px;
}

.tl-badge-mod {
    background: #f59e0b;
}

.tl-version {
    color: var(--tl-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.tl-tagline { color: var(--tl-muted); margin: 0; font-size: 0.95rem; }

.tl-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--tl-success);
    color: #fff !important;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 16px 28px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 163, 42, 0.35);
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.tl-download-btn:hover {
    background: #008a24;
    color: #fff;
    transform: translateY(-1px);
}

/* Screenshots */
.tl-screenshots {
    padding: 20px 24px;
}

.tl-screenshots-wrap {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.tl-screenshots-wrap a {
    flex-shrink: 0;
}

.tl-screenshots-wrap img {
    height: 220px;
    width: auto;
    border-radius: var(--tl-radius);
    border: 1px solid var(--tl-border);
}

/* App info table */
.tl-info-section { padding: 0 0 24px; }

.tl-info-section h3 {
    margin: 0 0 16px;
    font-size: 1.15rem;
    padding: 0 24px;
}

.tl-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0;
    padding: 0 24px 24px;
}

.tl-info-item {
    padding: 14px 16px;
    border-top: 1px solid var(--tl-border);
}

.tl-info-item p {
    margin: 0 0 4px;
    font-size: 0.8rem;
    color: var(--tl-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tl-info-item h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-word;
}

/* Content */
.tl-content-section {
    padding: 24px 0 32px;
}

.tl-content-box {
    padding: 28px;
    line-height: 1.75;
}

.tl-content-box h2,
.tl-content-box h3 {
    color: var(--tl-text);
    margin-top: 1.5em;
}

.tl-content-box img {
    max-width: 100%;
    height: auto;
    border-radius: var(--tl-radius);
}

/* Tags */
a.tl-tag,
.tl-tag {
    display: inline-block;
    background: #eef4fb;
    color: var(--tl-primary);
    border: 1px solid #c5d9ed;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 4px 6px 4px 0;
    transition: background 0.2s;
}

a.tl-tag:hover {
    background: var(--tl-primary);
    color: #fff;
    border-color: var(--tl-primary);
}

/* Article card */
.tl-article-card {
    display: block;
    padding: 20px;
    background: var(--tl-surface);
    border: 1px solid var(--tl-border);
    border-radius: var(--tl-radius);
    box-shadow: var(--tl-shadow);
    color: inherit;
    height: 100%;
}

.tl-article-card:hover {
    border-color: var(--tl-primary);
    color: inherit;
}

.tl-article-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.tl-article-card time {
    font-size: 0.8rem;
    color: var(--tl-muted);
}

/* Page title */
.tl-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 24px 0 8px;
}

.tl-page-desc {
    color: var(--tl-muted);
    margin-bottom: 24px;
}

/* Empty */
.tl-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--tl-muted);
}

/* Footer */
.tl-footer {
    background: var(--tl-surface);
    border-top: 1px solid var(--tl-border);
    margin-top: 40px;
    padding: 32px 0 20px;
}

.tl-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.tl-footer h5 {
    font-size: 0.9rem;
    margin: 0 0 12px;
    color: var(--tl-text);
}

.tl-footer a {
    display: block;
    color: var(--tl-muted);
    font-size: 0.875rem;
    padding: 3px 0;
}

.tl-footer-copy {
    text-align: center;
    font-size: 0.8rem;
    color: var(--tl-muted);
    padding-top: 20px;
    border-top: 1px solid var(--tl-border);
}

/* Pagination */
.pagination .page-link {
    color: var(--tl-primary);
}
.pagination .page-item.active .page-link {
    background: var(--tl-primary);
    border-color: var(--tl-primary);
}
