/* ============================================================
   GitHub Repos Page — matches theme modern-card aesthetic
   ============================================================ */

.repos-page {
    --rp-primary: var(--heo-main);
    --rp-primary-op: var(--heo-main-op);
    --rp-primary-op-deep: var(--heo-main-op-deep);
    --rp-blue: #425AEF;
    --rp-purple: #7B61FF;
    --rp-card: var(--heo-card-bg);
    --rp-soft: var(--heo-secondbg);
    --rp-text: var(--heo-fontcolor);
    --rp-muted: var(--heo-secondtext);
    --rp-border: var(--heo-card-border);
    --rp-border-hover: var(--heo-main);
    --rp-bg: var(--heo-background);
    --rp-radius: 14px;
    --rp-radius-lg: 18px;
    --rp-radius-sm: 10px;
    --rp-ease: cubic-bezier(.4, 0, .2, 1);
    --rp-shadow: var(--heo-shadow-border);
    --rp-shadow-hover: 0 12px 32px -8px rgba(0,0,0,.12), 0 4px 10px -2px var(--rp-primary-op);
    color: var(--rp-text);
    background: var(--rp-bg);
}

[data-theme="dark"] .repos-page {
    --rp-shadow-hover: 0 12px 32px -8px rgba(0,0,0,.5), 0 4px 10px -2px var(--rp-primary-op);
}

.repos-page#body-wrap > main.layout.hide-aside#content-inner {
    max-width: 1240px;
}

.repos-page#body-wrap > main.layout#content-inner > div#page {
    width: 100%;
    padding: 0;
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
}

.repos-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* ============ Banner Hero ============ */
.repos-banner {
    position: relative;
    border-radius: var(--rp-radius-lg);
    padding: 40px 44px 36px;
    margin-bottom: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--rp-primary) 0%, var(--rp-purple) 100%);
    color: #fff;
    animation: slide-in .6s .1s backwards;
    box-shadow: 0 8px 30px -6px var(--rp-primary-op-deep);
}

.repos-banner-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 50%),
        radial-gradient(circle at 10% 80%, rgba(255,255,255,.1), transparent 40%);
    pointer-events: none;
}

.repos-banner-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
    pointer-events: none;
}

.repos-banner-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
}

.deco-circle-1 {
    width: 220px; height: 220px;
    right: -60px; top: -60px;
}
.deco-circle-2 {
    width: 320px; height: 320px;
    right: -110px; top: -110px;
}
.deco-circle-3 {
    width: 120px; height: 120px;
    right: 40px; bottom: -40px;
    background: rgba(255,255,255,.06);
}

.repos-banner-content {
    position: relative;
    z-index: 2;
}

.repos-banner-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.repos-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    border: 1px solid rgba(255,255,255,.25);
}

.repos-banner-tags {
    display: flex;
    gap: 8px;
}

.banner-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: .7rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,.2);
}

.banner-tag i {
    font-size: .75rem;
}

.repos-banner-eyebrow {
    margin: 0 0 4px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: .8;
}

.repos-banner-title {
    margin: 0 0 10px;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.repos-banner-desc {
    margin: 0 0 22px;
    font-size: .92rem;
    line-height: 1.7;
    opacity: .9;
    max-width: 620px;
}

.repos-banner-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.18);
}

.banner-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.banner-stat b {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.banner-stat span {
    font-size: .72rem;
    opacity: .75;
    letter-spacing: .5px;
}

.banner-stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,.2);
}

/* ============ Section ============ */
.repos-section {
    margin-bottom: 24px;
}

.repos-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.repos-section-head-sm {
    margin-top: 8px;
}

.repos-section-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--rp-radius-sm);
    background: var(--rp-primary-op);
    color: var(--rp-primary);
    display: grid;
    place-items: center;
    font-size: .82rem;
    flex-shrink: 0;
}

.repos-section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rp-text);
    letter-spacing: -.2px;
}

.repos-section-en {
    margin-left: auto;
    font-size: .68rem;
    color: var(--rp-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* ============ Featured cards ============ */
.repos-featured {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.repo-featured-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--rp-radius);
    border: 1px solid var(--rp-border);
    background: var(--rp-card);
    text-decoration: none !important;
    color: inherit;
    transition: all .3s var(--rp-ease);
    overflow: hidden;
    box-shadow: var(--rp-shadow);
}

.repo-featured-card::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--lang-color, var(--rp-primary));
    opacity: 0;
    filter: blur(30px);
    transition: opacity .4s var(--rp-ease);
}

.repo-featured-card:hover {
    border-color: var(--lang-color, var(--rp-primary));
    transform: translateY(-2px);
    box-shadow: var(--rp-shadow-hover);
}

.repo-featured-card:hover::after {
    opacity: .15;
}

.feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--lang-color, var(--rp-primary)), var(--rp-purple));
    position: relative;
    z-index: 1;
}

.feat-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.feat-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--rp-text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feat-desc {
    font-size: .76rem;
    color: var(--rp-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feat-stars {
    font-size: .8rem;
    color: #F7A900;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .feat-stars {
    color: #ffc848;
}

/* ============ Toolbar ============ */
.repos-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    margin-bottom: 4px;
}

.repos-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.repos-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--rp-radius-sm);
    border: 1px solid var(--rp-border);
    background: var(--rp-card);
    color: var(--rp-muted);
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s var(--rp-ease);
    user-select: none;
    line-height: 1;
}

.repos-filter-btn:hover {
    border-color: var(--rp-primary);
    color: var(--rp-primary);
    background: var(--rp-primary-op);
}

.repos-filter-btn.active {
    background: linear-gradient(135deg, var(--rp-primary), var(--rp-purple));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px var(--rp-primary-op);
}

.repos-filter-btn .count {
    font-size: .7rem;
    opacity: .75;
    background: rgba(0,0,0,.08);
    padding: 2px 7px;
    border-radius: 8px;
    margin-left: 2px;
    font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .repos-filter-btn .count {
    background: rgba(255,255,255,.12);
}

.repos-filter-btn.active .count {
    background: rgba(255,255,255,.25);
    opacity: 1;
}

.repos-search {
    position: relative;
    display: flex;
    align-items: center;
}

.repos-search i {
    position: absolute;
    left: 13px;
    color: var(--rp-muted);
    font-size: .85rem;
    pointer-events: none;
}

.repos-search input {
    padding: 9px 16px 9px 36px;
    border-radius: var(--rp-radius-sm);
    border: 1px solid var(--rp-border);
    background: var(--rp-card);
    color: var(--rp-text);
    font-size: .84rem;
    width: 230px;
    outline: none;
    transition: all .25s var(--rp-ease);
}

.repos-search input:focus {
    width: 280px;
    border-color: var(--rp-primary);
    box-shadow: 0 0 0 3px var(--rp-primary-op);
}

.repos-search input::placeholder {
    color: var(--rp-muted);
}

/* ============ Result info ============ */
.repos-result-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px 14px;
    font-size: .8rem;
    color: var(--rp-muted);
}

.repos-result-info b {
    color: var(--rp-text);
    font-weight: 700;
}

/* ============ Repo Grid ============ */
.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* ============ Repo Card ============ */
.repo-card {
    position: relative;
    display: block;
    border-radius: var(--rp-radius);
    border: 1px solid var(--rp-border);
    background: var(--rp-card);
    text-decoration: none !important;
    color: inherit;
    transition: all .3s var(--rp-ease);
    overflow: hidden;
    box-shadow: var(--rp-shadow);
}

.repo-card:hover {
    border-color: var(--rp-primary);
    transform: translateY(-4px);
    box-shadow: var(--rp-shadow-hover);
}

.repo-card:hover .repo-card-top {
    transform: scaleX(1);
}

.repo-card-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rp-primary), var(--rp-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--rp-ease);
    z-index: 1;
}

.repo-card-body {
    padding: 20px;
}

.repo-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.repo-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.repo-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15), transparent 50%);
}

.repo-avatar-owner {
    background: linear-gradient(135deg, var(--rp-primary), var(--rp-blue));
}

.repo-avatar-rec {
    background: linear-gradient(135deg, #F77234, #c2410c);
}

.repo-card-t {
    flex: 1;
    min-width: 0;
}

.repo-name-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.repo-author {
    font-size: .88rem;
    color: var(--rp-muted);
    font-weight: 500;
}

.repo-name {
    font-size: .98rem;
    font-weight: 700;
    color: var(--rp-text);
    line-height: 1.3;
    word-break: break-all;
}

.repo-arrow {
    color: var(--rp-muted);
    font-size: .85rem;
    flex-shrink: 0;
    opacity: 0;
    transform: translate(-4px, 2px);
    transition: all .25s var(--rp-ease);
    margin-top: 2px;
}

.repo-card:hover .repo-arrow {
    opacity: 1;
    transform: translate(0, 2px);
    color: var(--rp-primary);
}

.repo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    margin-left: auto;
    margin-top: 2px;
}

.badge-owner {
    background: rgba(66,90,239,.1);
    color: var(--rp-blue);
}

[data-theme="dark"] .badge-owner {
    background: rgba(66,90,239,.18);
}

.badge-star {
    background: rgba(247,169,0,.12);
    color: #F7A900;
}

[data-theme="dark"] .badge-star {
    background: rgba(255,200,72,.15);
    color: #ffc848;
}

.repo-desc {
    margin: 0 0 14px;
    color: var(--rp-muted);
    font-size: .84rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.repo-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.repo-topic {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--rp-soft);
    color: var(--rp-muted);
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.5;
    transition: all .2s;
}

.repo-card:hover .repo-topic {
    background: var(--rp-primary-op);
    color: var(--rp-primary);
}

.repo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--rp-soft);
    font-size: .78rem;
    color: var(--rp-muted);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color .2s;
}

.meta-item:hover {
    color: var(--rp-primary);
}

.lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--rp-card);
}

/* ============ Empty state ============ */
.repos-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 20px;
    text-align: center;
    border-radius: var(--rp-radius);
    background: var(--rp-card);
    border: 1px dashed var(--rp-border);
}

.repos-empty.show {
    display: flex;
    animation: slide-in .4s backwards;
}

.repos-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--rp-soft);
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    color: var(--rp-muted);
    margin-bottom: 16px;
    opacity: .7;
}

.repos-empty h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: var(--rp-text);
    font-weight: 600;
}

.repos-empty p {
    margin: 0;
    font-size: .85rem;
    color: var(--rp-muted);
}

/* ============ Footer note ============ */
.repos-footer-note {
    margin-top: 28px;
    padding: 16px 20px;
    border-radius: var(--rp-radius-sm);
    background: var(--rp-primary-op);
    border: 1px solid var(--rp-primary-op);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .82rem;
    color: var(--rp-muted);
    line-height: 1.6;
}

.repos-footer-note i {
    font-size: 1.2rem;
    color: var(--rp-primary);
    flex-shrink: 0;
}

/* ============ Article container reset ============ */
#article-container .repos-banner-title {
    padding: 0;
    border: none;
}

#article-container .repos-banner-title::before {
    content: none;
    display: none;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
    .repos-banner {
        padding: 32px 28px 28px;
    }
    .repos-banner-title {
        font-size: 1.7rem;
    }
    .repos-grid {
        grid-template-columns: 1fr;
    }
    .repos-search input {
        width: 190px;
    }
    .repos-search input:focus {
        width: 230px;
    }
}

@media (max-width: 600px) {
    .repos-container {
        padding: 16px 14px 40px;
    }
    .repos-banner {
        padding: 28px 22px 24px;
        border-radius: var(--rp-radius);
        margin-bottom: 20px;
    }
    .repos-banner-head {
        gap: 10px;
        margin-bottom: 10px;
    }
    .repos-banner-icon {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
        border-radius: 10px;
    }
    .banner-tag {
        font-size: .65rem;
        padding: 3px 8px;
    }
    .repos-banner-title {
        font-size: 1.45rem;
    }
    .repos-banner-desc {
        font-size: .84rem;
        margin-bottom: 16px;
    }
    .repos-banner-stats {
        gap: 14px;
        padding-top: 14px;
    }
    .banner-stat b {
        font-size: 1.2rem;
    }
    .banner-stat-divider {
        height: 22px;
    }
    .deco-circle-1, .deco-circle-2 {
        display: none;
    }
    .repos-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .repos-search {
        width: 100%;
    }
    .repos-search input {
        width: 100%;
    }
    .repos-search input:focus {
        width: 100%;
    }
    .repo-card-body {
        padding: 16px;
    }
    .repos-featured {
        grid-template-columns: 1fr;
    }
    .repos-footer-note {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
    }
}
