/* ============================================
   Google Fonts
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Changa+One&family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS Variables (Design Tokens)
   ============================================ */
:root {
    --navy: #0a1628;
    --navy-light: #162240;
    --navy-rgb: 10, 22, 40;

    --accent: hsl(0, 84%, 43%);
    --accent-hover: hsl(0, 84%, 35%);
    --accent-light: hsl(0, 84%, 53%);
    --accent-rgb: 183, 18, 18;

    --bg: hsl(220, 20%, 97%);
    --fg: #0a1628;
    --fg-muted: hsl(220, 9%, 46%);

    --card-bg: #fff;
    --border-color: hsl(220, 13%, 89%);
    --muted-bg: hsl(220, 14%, 92%);

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(10, 22, 40, 0.08);

    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-full: 9999px;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-logo: 'Changa One', cursive;

    --header-height: 4rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    /* text-lg */
    line-height: 1.75;
    /* leading-7 */
    color: var(--fg);
    background-color: var(--bg);
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    line-height: 1.2;
}

button {
    font-family: inherit;
    cursor: pointer;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ============================================
   Utility Classes
   ============================================ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
}

/* ============================================
   Layout Wrapper
   ============================================ */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background-color: var(--navy);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

/* Logo */
.logo {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.logo a {
    display: flex;
    align-items: center;
    padding: 0 1.5rem 0 1rem;
    /* pl-4 pr-6 */
    background-color: var(--accent);
    color: #fff;
    font-family: var(--font-logo);
    font-size: 1.25rem;
    /* text-xl */
    font-weight: 400;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
    white-space: nowrap;
    text-indent: 0;
    overflow: visible;
    width: auto;
    height: 100%;
    background-image: none;
}


/* Search wrapper */
.logo-search {
    display: contents;
}

.searchbox {
    display: flex;
    width: 100%;
    max-width: 32rem;
}

/* Google Custom Search Overrides */
.gsc-control-cse {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

form.gsc-search-box,
table.gsc-search-box {
    margin-bottom: 0 !important;
}

/* The input container itself mimicking shadcn/ui Input */
.gsc-input-box {
    display: flex !important;
    align-items: center !important;
    height: 2.5rem !important;
    /* h-10 */
    width: 100% !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    /* border-primary-foreground/20 */
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* bg-primary-foreground/10 */
    padding: 0 0.75rem 0 2.25rem !important;
    /* pl-9 pr-3 */
    position: relative !important;
    box-shadow: none !important;
    transition: box-shadow 0.2s, border-color 0.2s !important;
}

.gsc-input-box-focus {
    outline: none !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent) !important;
    /* focus-visible:ring-accent */
}

/* Add custom magnifying glass icon since GCSe is rendered an iframe which is annoying, fake it with background image */
.gsc-input-box::before {
    content: "" !important;
    position: absolute !important;
    left: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 1rem !important;
    /* w-4 */
    height: 1rem !important;
    /* h-4 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-search'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    z-index: 10 !important;
    pointer-events: none !important;
}


#gs_tti50 {
    padding: 0 !important;
}

#gsc-i-id1,
.gsc-input {
    color: #fff !important;
    /* text-primary-foreground */
    text-indent: 0 !important;
    font-size: 1rem !important;
    /* text-base scaled or sm */
    line-height: 1.5 !important;
    font-family: var(--font-body) !important;
    background: transparent !important;
    background-image: none !important;
    padding: 0 !important;
    height: 100% !important;
    /* Remove native browser search field appearance (hides built-in magnifying glass) */
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Hide WebKit/Blink native search decoration (the magnifying glass icon) */
#gsc-i-id1::-webkit-search-decoration,
#gsc-i-id1::-webkit-search-cancel-button,
.gsc-input::-webkit-search-decoration,
.gsc-input::-webkit-search-cancel-button {
    display: none !important;
    -webkit-appearance: none !important;
}

/* Placeholder text styles for GCSe input */
#gsc-i-id1::placeholder,
#gsc-i-id1::-webkit-input-placeholder,
#gsc-i-id1::-moz-placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    /* placeholder:text-primary-foreground/50 */
    opacity: 1 !important;
}

/* Hide default GCSe search button and clear button to match React simplicity */
.gsc-search-button,
.gsst_b {
    display: none !important;
}

.gsib_a {
    padding: 0 !important;
    height: 100% !important;
    background-image: none !important;
}

/* Header buttons area */
.buttons {
    display: none;
}

/* Mobile burger */
.header-burger {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 0.5rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content {
    flex: 1 1 auto;
    padding: 2rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Ad zones */
.advert-1 {
    margin: 0 0 1.5rem;
    width: 100%;
    min-height: 1rem;
}

.advert-2 {
    margin: 2rem 0;
    width: 100%;
}

/* ============================================
   CONTENT + SIDEBAR LAYOUT
   ============================================ */
.content-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}

/* ============================================
   PAGE TITLE
   ============================================ */
.page-title-block {
    margin-bottom: 1.5rem;
    /* mb-6 */
}

.page-title-block.glass {
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
}

.page-title-block h1 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fg);
}

.page-title-block h2 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--fg);
}

.page-title-block .page-subtitle {
    color: var(--fg-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ============================================
   MODELS
   ============================================ */
.models {
    width: 100%;
    min-width: 0;
}

/* ============================================
   MODEL GRID
   ============================================ */
.models-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    /* grid-cols-1 */
    gap: 1.25rem;
    /* gap-5 */
}

.models-grid .model-card {
    display: block;
    width: 100%;
    text-decoration: none;
}

/* ============================================
   MODEL CARD
   ============================================ */
.model-card {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease-out;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
    width: 100%;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px var(--glass-shadow);
}

/* Card image container */
.card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--muted-bg);
    width: 100%;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.model-card:hover .card-image img {
    transform: scale(1.1);
}

/* Gradient overlay on hover */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.6), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.model-card:hover .card-overlay {
    opacity: 1;
}

/* Download pill badge on hover */
.card-download {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.model-card:hover .card-download {
    opacity: 1;
}

.card-download span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    /* text-sm */
    line-height: 1.25rem;
    font-weight: 500;
    color: #fff;
    background-color: var(--accent);
    padding: 0.25rem 0.6rem;
    /* py-1 px-2.4 */
    border-radius: var(--radius-full);
}

.card-download span .icon {
    width: 0.75rem;
    height: 0.75rem;
}

/* Card info area below image */
.card-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Title row: name on left, download count on right */
.card-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
}

.card-info .card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.model-card:hover .card-title {
    color: var(--accent);
}

/* Category line below title */
.card-cat {
    font-size: 0.75rem;
    color: var(--fg-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.card-info .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--fg-muted);
    margin-top: 0.5rem;
}

.card-downloads {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--fg-muted);
    white-space: nowrap;
}

.card-meta .icon,
.card-downloads .icon {
    width: 0.75rem;
    height: 0.75rem;
}

/* ============================================
   POPUP (Terms & Conditions)
   ============================================ */
#openPopup {
    cursor: pointer;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: start;
    z-index: 100;
}

.overlay .popup {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: left;
    width: 50%;
    position: relative;
    top: 5rem;
    max-height: 80vh;
    overflow-y: auto;
}

.overlay .popup .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--fg-muted);
}

.popup p {
    padding: 0 0 1rem;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.popup strong {
    font-weight: 700;
}

.popup a {
    color: var(--accent);
    text-decoration: underline;
}

.popup a:hover {
    text-decoration: none;
}

/* ============================================
   PAGINATION
   ============================================ */
.navigation {
    margin-top: 2rem;
}

.next-back {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
}

.next-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--fg-muted);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.9rem;
}

.next-back a:hover {
    color: var(--fg);
    border-color: var(--fg-muted);
    background-color: var(--muted-bg);
}

.paginator {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin: 1.5rem 0;
}

.paginator li {
    display: inline-flex;
}

.paginator a,
.paginator .selection {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.paginator a {
    color: var(--fg);
    border: 1px solid var(--border-color);
    background: #fff;
}

.paginator a:hover {
    border-color: var(--fg-muted);
    background-color: var(--muted-bg);
}

.selection {
    background-color: var(--accent) !important;
    color: #fff !important;
    border: 1px solid var(--accent) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}

/* ============================================
   SIDEBAR MENU
   ============================================ */
.sidebar-menu {
    width: 100%;
    flex-shrink: 0;
}

.sidebar-menu-inner {
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
}

/* Category group toggle */
.sidebar-menu .cat-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--fg);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-menu .cat-group-toggle:hover {
    background-color: var(--muted-bg);
}

.sidebar-menu .cat-group-toggle .chevron {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    color: var(--fg-muted);
    transition: transform 0.2s;
    font-size: 0.8rem;
    line-height: 1.2rem;
    text-align: center;
}

.sidebar-menu .cat-group-toggle[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

/* Category links */
.sidebar-menu h2 {
    font-weight: 600;
    /* font-semibold */
    font-size: 1.125rem;
    /* text-lg */
    color: var(--fg);
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    /* p-2 */
    border-radius: var(--radius-sm);
}

.sidebar-menu ul {
    margin-bottom: 0.5rem;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu ul a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem 0.75rem;
    /* py-1.5 px-3 */
    font-size: 1rem;
    /* text-base */
    color: var(--fg-muted);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.sidebar-menu ul a:hover {
    color: var(--fg);
    background-color: var(--muted-bg);
    text-decoration: none;
}

.sidebar-menu ul .selected a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.sidebar-menu .cat-count {
    font-size: 0.875rem;
    /* text-sm */
    opacity: 0.6;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: var(--navy);
    color: #fff;
    margin-top: 3rem;
    flex-shrink: 0;
}

.footer-inner {
    padding: 3rem 1rem;
    /* py-12 px-4 */
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Footer brand */
.footer-brand .footer-logo {
    font-family: var(--font-logo);
    font-size: 2.25rem;
    /* text-4xl */
    font-weight: 400;
    color: #fff;
    display: inline-block;
    margin-top: -0.4rem;
    line-height: 1;
    margin-bottom: 1rem;
    text-decoration: none;
}

.footer-brand .footer-logo:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-brand .footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    /* text-primary-foreground/60 */
    font-size: 1rem;
    /* text-base */
    line-height: 1.625;
    /* leading-relaxed */
}

/* Footer sections */
.footer-section h4 {
    font-family: var(--font-display);
    font-weight: 600;
    /* font-semibold */
    font-size: 1.125rem;
    /* text-lg */
    color: #fff;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    /* text-primary-foreground/70 */
    font-size: 1rem;
    /* text-base */
    transition: color 0.2s;
}

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

/* Format badges */
.footer-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-formats .format-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    /* px-2 py-1 */
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    /* font-medium */
    background-color: rgba(255, 255, 255, 0.1);
    /* bg-primary-foreground/10 */
    color: rgba(255, 255, 255, 0.8);
    /* text-primary-foreground/80 */
    border-radius: 0.25rem;
    /* rounded */
}

/* Footer bottom */
.footer-bottom {
    margin-top: 2.5rem;
    /* mt-10 */
    padding-top: 1.5rem;
    /* pt-6 */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* border-primary-foreground/10 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    /* gap-4 */
    font-size: 0.875rem;
    /* text-sm */
    color: rgba(255, 255, 255, 0.5);
    /* text-primary-foreground/50 */
}

.copyright {
    font-weight: 400;
    text-decoration: none;
    padding: 0;
}

/* Legacy footer__menu (unused but kept for safety) */
.footer__menu {
    display: none;
}

/* ============================================
   MODEL DETAIL PAGE
   ============================================ */
.model-wrapper {
    width: 100%;
    min-width: 0;
}

/* Glass card container */
.model {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
}

.model-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 512px;
    background-color: var(--muted-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.model-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* Description / Info */
/* Description / Info */
.model-desc {
    padding: 1.5rem;
    color: var(--fg);
    font-size: 1rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.model-desc h1 {
    font-family: var(--font-display);
    font-size: 1.875rem;
    /* text-3xl */
    line-height: 2.25rem;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 0.5rem;
}

.hsh {
    color: var(--fg-muted);
    font-weight: 400;
    font-size: 0.85em;
}

.model-subtitle {
    font-size: 1.125rem;
    /* text-lg */
    color: var(--fg-muted);
    margin: 0 0 1.5rem 0;
    /* mb-6 */
    line-height: 1.6;
}

.model-desc a {
    color: var(--fg-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.model-desc a:hover {
    color: var(--accent);
}

/* Metadata grid */
.model-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    /* text-lg */
}

.model-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--fg-muted);
    font-variant-numeric: tabular-nums;
}

.model-meta-item.full-width {
    grid-column: span 2;
}

.model-meta-item .meta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.model-meta-item .meta-icon svg {
    width: 1rem;
    height: 1rem;
}

/* Category Block */
.model-category-block {
    margin-top: 1.5rem;
    /* mt-6 */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    /* pb-4 */
    margin-bottom: 1rem;
    /* mb-4 */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--fg-muted);
    font-size: 1.125rem;
    /* text-lg */
}

.model-category-block strong {
    font-weight: 600;
    color: var(--fg);
}

.model-category-block .meta-icon svg {
    width: 1rem;
    height: 1rem;
    color: var(--accent);
}

/* Tags */
.model-tags {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.model-tags .tag-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    /* text-sm */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.model-tags .tag-title svg {
    width: 1rem;
    height: 1rem;
    color: var(--accent);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-list a {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    /* py-1 px-2.5 */
    font-size: 0.875rem;
    /* text-sm */
    background-color: var(--muted-bg);
    color: var(--fg);
    border-radius: var(--radius-full);
    /* rounded-full */
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 600;
    /* font-semibold */
}

.tag-list a:hover {
    background-color: var(--accent);
    color: #fff;
}

/* Download section */
.model-download-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.model-download-section .download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    background-color: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
    /* text-lg */
    height: 3rem;
    /* h-12 */
    padding: 0 2rem;
    /* px-8 */
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.model-download-section .download-btn:hover {
    background-color: var(--accent-hover);
    color: #fff;
}

.model-download-section .download-btn svg {
    margin-right: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
}

/* Terms link */
.terms-note {
    font-size: 0.875rem;
    /* text-sm */
    color: var(--fg-muted);
    width: fit-content;
    margin: 0;
}

.terms-note a {
    text-decoration: underline;
    transition: color 0.2s;
}

.terms-note a:hover {
    color: var(--accent);
}

.terms-note a {
    text-decoration: underline;
    color: var(--fg-muted);
}

.terms-note a:hover {
    color: var(--accent);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Small phones (< 640px) */
@media (max-width: 639px) {
    .content {
        padding: 2rem 1rem;
    }

    .models-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 1.25rem;
    }

    .header-burger {
        display: flex;
    }

    .searchbox {
        display: none;
    }

    .logo a {
        font-size: 1.25rem;
        padding: 0 1.5rem 0 1rem;
    }
}

/* Tablets (640px - 767px) */
@media (min-width: 640px) {
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
        /* sm:grid-cols-2 */
        gap: 1.25rem;
        /* gap-5 */
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }

    .page-title-block h1 {
        font-size: 1.5rem;
        /* sm:text-2xl */
    }

    .page-title-block h2 {
        font-size: 1.25rem;
        /* sm:text-xl */
    }

    .card-info {
        padding: 1rem;
        /* sm:p-4 */
    }

    .card-info .card-title {
        font-size: 1rem;
        /* sm:text-base */
    }

    .card-info .card-meta {
        font-size: 0.875rem;
        /* sm:text-sm */
    }

    .card-meta .icon {
        width: 0.875rem;
        height: 0.875rem;
        /* sm:w-3.5 sm:h-3.5 */
    }

    .sidebar-menu h2 {
        font-size: 1.25rem;
        /* sm:text-xl */
    }

    .sidebar-menu ul a {
        font-size: 1.125rem;
        /* sm:text-lg */
    }

    .sidebar-menu .cat-count {
        font-size: 1rem;
        /* sm:text-base */
    }
}

/* Medium (768px+) */
@media (min-width: 768px) {
    .content {
        padding: 2rem 2rem;
    }

    .models-grid {
        grid-template-columns: repeat(3, 1fr);
        /* md:grid-cols-3 */
    }

    .header {
        padding: 0 2rem;
    }

    .logo a {
        font-size: 1.5rem;
        padding: 0 2.5rem 0 1.5rem;
    }

    .model {
        flex-direction: row;
    }

    .model-img {
        width: 512px;
        height: 512px;
        aspect-ratio: auto;
    }



    .footer-inner {
        padding: 3rem 2rem;
        /* md:px-8 py-12 */
    }

    .page-title-block h1 {
        font-size: 1.875rem;
        /* md:text-3xl */
    }

    .page-title-block h2 {
        font-size: 1.5rem;
        /* md:text-2xl */
    }
}

/* Tablet / Mobile (Hide sidebar) */
@media (max-width: 1023px) {
    .content-layout .sidebar-menu {
        display: none;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .models-grid {
        grid-template-columns: repeat(4, 1fr);
        /* lg:grid-cols-4 */
    }

    .content-layout {
        flex-direction: row;
    }

    .content-layout .models,
    .content-layout .model-wrapper {
        width: 80%;
        min-width: 0;
    }

    .content-layout .sidebar-menu {
        width: 20%;
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .logo a {
        font-size: 2.25rem;
        padding: 0 4rem 0 2rem;
    }

    .sidebar-menu h2 {
        font-size: 1.5rem;
        /* lg:text-2xl */
    }
}

/* Large desktop (1280px+) */
@media (min-width: 1280px) {
    .content {
        padding: 2rem 2.5rem;
    }

    .models-grid {
        grid-template-columns: repeat(4, 1fr);
        /* xl:grid-cols-4 */
    }
}

/* XL desktop (1536px+) */
@media (min-width: 1536px) {
    .models-grid {
        grid-template-columns: repeat(5, 1fr);
        /* 2xl:grid-cols-5 */
        gap: 1.25rem;
    }
}

/* 4K screens */
@media (min-width: 2560px) {
    .models-grid {
        gap: 1.5rem;
    }
}

/* ============================================
   ACCESSIBILITY & AI HELPERS
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================
   SIMILAR MODELS SECTION
   ============================================ */
.similar-models-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.similar-models-header {
    margin-bottom: 1.5rem;
}

.similar-models-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fg);
}

/* Ensure similar models cards retain text-decoration rules correctly */
.similar-models-section .model-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.similar-models-section .model-card-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--muted-bg);
}

.similar-models-section .model-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.similar-models-section .model-card:hover .model-card-img img {
    transform: scale(1.1);
}

.similar-models-section .model-card-info {
    padding: 1rem;
}

.similar-models-section .model-card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
    line-height: 1.3;
}

.similar-models-section .model-card:hover .model-card-title {
    color: var(--accent);
}

.similar-models-section .model-card-category {
    display: block;
    font-size: 0.875rem;
    color: var(--fg-muted);
    margin-top: 0.5rem;
}