/*
Theme Name: XPORNER
Theme URI: https://example.com/xporner
Author: Ali
Description: Compact white video-grid theme with a centered homepage, slim header, category navigation, and built-in preview placeholders.
Version: 0.1.0
Text Domain: xporner
Tags: blog, grid-layout, custom-logo
*/

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #20242c;
    --muted: #707783;
    --line: #e8eaf0;
    --accent: #f53376;
    --accent-dark: #ca1f59;
    --chip: #f1f3f7;
    --shadow: 0 1px 16px rgba(0, 0, 0, .14);
    --container: 1260px;
    --gutter: 11px;
    --font: Arial, Helvetica, sans-serif;
}

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

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
}

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

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

.xp-container {
    width: 100%;
    max-width: calc(var(--container) + (var(--gutter) * 2));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.xp-header {
    z-index: 50;
    background: #fff;
    box-shadow: 0 5px 8px 0 rgba(50, 50, 50, .12);
    padding: 15px 0 0;
}

.xp-header-inner {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    min-height: 50px;
    gap: 18px;
}

.xp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2d3340;
    cursor: pointer;
}

.xp-icon-btn svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    fill: none;
}

.xp-logo {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0;
    color: var(--accent);
    text-transform: uppercase;
}

.xp-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    border-radius: 50%;
    color: #fff;
    background: radial-gradient(circle at 30% 28%, #ff6b8a, var(--accent) 58%, var(--accent-dark));
    font-size: 19px;
    font-weight: 900;
}

.xp-top-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    height: 34px;
    margin-top: 11px;
    background: #fff;
}

.xp-top-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    font-size: 14px;
    color: #2f3841;
}

.xp-top-nav a:hover,
.xp-top-nav a.is-current {
    color: #fff;
    background: var(--accent);
}

.xp-category-panel {
    display: none;
    padding: 14px 0 16px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.xp-search {
    margin: 0 0 10px;
}

.xp-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #d8dce4;
    border-radius: 5px;
    font: inherit;
}

.xp-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.xp-category-links a {
    color: #2f3841;
}

.xp-category-links a:hover {
    color: var(--accent);
}

.xp-main {
    padding: 25px 0 34px;
}

.xp-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 15px;
}

.xp-title {
    margin: 0;
    color: #2f3841;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.2;
}

.xp-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0;
}

.xp-tabs a {
    padding: 7px 10px;
    font-size: 13px;
    color: #2f3841;
    text-transform: uppercase;
}

.xp-tabs a.is-active,
.xp-tabs a:hover {
    color: #fff;
    background: var(--accent);
}

.xp-intro {
    max-width: 1000px;
    margin: 0 0 18px;
    color: #4e5965;
}

.xp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px 32px;
}

.xp-card {
    min-width: 0;
}

.xp-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #d9dee7, #aeb6c6);
    border-radius: 5px;
    box-shadow: 0 1px 16px transparent;
    transition: box-shadow .3s;
}

.xp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.xp-thumb-fallback {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(140deg, rgba(230, 31, 80, .34), transparent 42%),
        linear-gradient(315deg, rgba(32, 36, 44, .36), transparent 50%),
        linear-gradient(90deg, #cfd5df, #f2dfe5);
}

.xp-badge {
    position: absolute;
    z-index: 2;
    min-width: 24px;
    padding: 6px 5px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .8);
    box-shadow: 0 0 8px rgba(27, 33, 39, .22);
    color: #323844;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.xp-badge-time {
    left: 10px;
    bottom: 10px;
}

.xp-badge-quality {
    right: 10px;
    top: 10px;
}

.xp-rating {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-width: 24px;
    padding: 6px 5px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .8);
    box-shadow: 0 0 8px rgba(27, 33, 39, .22);
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.xp-card-title {
    display: block;
    margin-top: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #1f2430;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
}

.xp-card:hover .xp-thumb {
    box-shadow: var(--shadow);
}

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

.xp-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 24px 0 0;
}

.xp-pagination ul {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.xp-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: #404754;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.xp-pagination .current {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.xp-section {
    margin-top: 18px;
}

.xp-section-head {
    display: flex;
    align-items: center;
    margin: 0 0 15px;
}

.xp-section-head h2 {
    flex: 1;
    margin: 0;
    color: #2f3841;
    font-size: 22px;
    font-weight: 400;
}

.xp-grid-compact {
    margin-bottom: 8px;
}

.xp-more {
    margin: 8px 0 20px;
    padding: 8px;
    text-align: center;
}

.xp-more a {
    color: var(--accent);
}

.xp-model-strip {
    margin: 0 0 20px;
    padding: 30px 0;
    border-top: 1px dotted #ccc;
    background: #f1f1f1;
}

.xp-models {
    display: grid;
    grid-template-columns: 34px repeat(10, minmax(82px, 1fr)) 34px;
    gap: 12px;
    align-items: start;
}

.xp-models button {
    height: 110px;
    border: 0;
    background: transparent;
    color: #2f3841;
    font-size: 30px;
    cursor: pointer;
}

.xp-model {
    display: block;
    color: #2f3841;
    text-align: center;
    overflow: hidden;
}

.xp-model-photo {
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 5px;
    background:
        linear-gradient(145deg, rgba(245, 51, 118, .24), transparent 45%),
        linear-gradient(315deg, rgba(47, 56, 65, .28), transparent 52%),
        #dfe3ea;
}

.xp-model span:last-child {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.xp-tag-cloud {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 10px;
    border-radius: 5px;
    background: #efefef;
}

.xp-tag-cloud a {
    display: block;
    padding: 7px 10px;
    border-radius: 5px;
    color: #2f3841;
}

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

.xp-seo {
    margin-top: 36px;
    margin-bottom: 20px;
    color: #2f3841;
}

.xp-seo h2 {
    margin: 22px 0 10px;
    font-size: 22px;
    font-weight: 400;
}

.xp-seo p {
    margin: 0 0 14px;
    color: #4e5965;
}

.xp-footer {
    padding: 22px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #fff;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 720px) {
    :root {
        --container: 100%;
    }

    .xp-top-nav {
        gap: 18px;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 12px;
    }

    .xp-category-panel {
        display: block;
    }

    .xp-title-row {
        display: block;
    }

    .xp-tabs {
        justify-content: flex-start;
        margin-top: 8px;
    }
}

@media (max-width: 850px) {
    .xp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xp-models {
        grid-template-columns: 28px repeat(5, minmax(96px, 1fr)) 28px;
        overflow-x: auto;
    }
}

@media (max-width: 520px) {
    .xp-grid {
        grid-template-columns: 1fr;
    }

    .xp-logo {
        font-size: 18px;
    }

    .xp-logo-mark {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .xp-tag-cloud {
        grid-template-columns: 1fr;
    }
}
