.patch-page {
    min-height: calc(100vh - 200px);
    padding: 42px 20px 70px;
    position: relative;
}

.patch-page::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 24%;
    width: 820px;
    height: 560px;
    background:
        radial-gradient(ellipse at 30% 10%, rgba(74, 163, 255, 0.10) 0%, transparent 48%),
        radial-gradient(ellipse at 82% 36%, rgba(16, 185, 129, 0.06) 0%, transparent 42%);
    pointer-events: none;
}

.patch-card {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    background:
        radial-gradient(ellipse at 18% 0%, rgba(74, 163, 255, 0.10) 0%, transparent 42%),
        linear-gradient(180deg, rgba(10, 15, 25, 0.58), rgba(7, 12, 22, 0.52));
    backdrop-filter: blur(16px) saturate(130%);
    border: 1px solid rgba(125, 175, 255, 0.14);
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 18px 44px rgba(0,0,0,0.25);
    color: #cfe7ff;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.patch-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 175, 255, 0.42), transparent);
}

/* HEADER */
.patch-header-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    margin-bottom: 24px;
}

.patch-title {
    font-size: 2.35rem;
    font-weight: 900;
    color: #f4f8ff;
    margin-bottom: 12px;
}

.patch-subtitle {
    color: #9fb2ce;
    font-size: 1.05rem;
    margin-bottom: 0;
    line-height: 1.7;
}

.patch-summary {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 10px;
}

.patch-summary-item {
    min-width: 112px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
}

.patch-summary-label {
    color: #8fa5c4;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.patch-summary-value {
    margin-top: 5px;
    color: #f4f8ff;
    font-size: 1rem;
    font-weight: 900;
}

.patch-feed-links,
.patch-controls,
.patch-results-meta {
    position: relative;
    z-index: 1;
}

.patch-feed-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.patch-feed-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid rgba(125, 175, 255, 0.18);
    background: rgba(255, 255, 255, 0.045);
    color: #9fcbff;
    font-weight: 900;
    text-decoration: none;
}

.patch-controls {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.patch-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(125, 175, 255, 0.16);
    background: rgba(3, 7, 14, 0.34);
}

.patch-search i {
    color: #7bb4ff;
}

.patch-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #eaf2ff;
    background: transparent;
}

.patch-filter-tabs {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
    min-width: 0;
}

.patch-filter {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(125, 175, 255, 0.16);
    background: rgba(255, 255, 255, 0.045);
    color: #c7d8f2;
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

.patch-filter.active,
.patch-filter:hover {
    color: #fff;
    border-color: rgba(74, 163, 255, 0.36);
    background: rgba(74, 163, 255, 0.16);
}

.patch-results-meta {
    margin-bottom: 14px;
    color: #8fa5c4;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.patch-listing {
    display: grid;
    gap: 14px;
}

/* PATCH ITEMS */
.patch-item {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    margin-bottom: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.patch-item:hover {
    border-color: rgba(125, 175, 255, 0.24);
}

.patch-item.open {
    background: rgba(74,163,255,0.055);
    border-color: rgba(74,163,255,0.20);
}

.patch-header {
    background: rgba(7, 12, 22, 0.30);
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
}

.patch-header:hover {
    background: rgba(74,163,255,0.08);
}

.patch-item.open .patch-header {
    background: rgba(74,163,255,0.10);
    border-bottom: 1px solid rgba(74,163,255,0.14);
}

.patch-header-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #f4f8ff;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.patch-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.patch-header-date {
    color: #8fa5c4;
    font-size: 0.85rem;
    font-weight: 700;
}

.patch-anchor {
    color: #7bb4ff;
    text-decoration: none;
}

.patch-category-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(125, 175, 255, 0.18);
    background: rgba(255, 255, 255, 0.045);
    color: #a9bfdc;
    font-size: 0.7rem;
    font-weight: 900;
}

.patch-header-icon {
    font-size: 1rem;
    color: #4aa3ff;
    transition: transform 0.3s ease;
    display: inline-block;
}

.patch-item.open .patch-header-icon {
    transform: rotate(180deg);
}

.patch-content {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(3, 7, 14, 0.22);
    contain: layout;
}

.patch-item.open .patch-content {
    padding: 24px;
    max-height: 10000px;
}

/* PATCH SECTIONS */
.patch-section {
    margin-bottom: 24px;
}

.patch-section:last-child {
    margin-bottom: 0;
}

.patch-section-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #60a5fa;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.patch-section-title i {
    font-size: 1rem;
}

.patch-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin: 24px 0;
    position: relative;
}

.patch-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 163, 255, 0.3), transparent);
}

/* LISTS */
.patch-list {
    margin-left: 0;
    padding-left: 20px;
    color: #9fb2ce;
    font-size: 0.9rem;
    line-height: 1.7;
}

.patch-list li {
    margin-bottom: 8px;
}

.patch-list strong {
    color: #e4ecff;
    font-weight: 600;
}

.patch-list ul {
    margin-top: 6px;
    margin-bottom: 8px;
}

/* CODE */
.patch-list code {
    background: rgba(74,163,255,0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #7ec8ff;
    font-family: 'Consolas', monospace;
}

.patch-search-hit {
    padding: 1px 3px;
    border-radius: 4px;
    background: rgba(250, 204, 21, 0.26);
    color: #fff7cc;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.24);
}

/* LATEST TAG */
.patch-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #4aa3ff, #1f6fd6);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.patch-tag::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    animation: pulse-dot 1.5s infinite;
}

.patch-empty {
    padding: 42px 18px;
    text-align: center;
    color: #8fa5c4;
}

.patch-empty i {
    display: block;
    margin-bottom: 10px;
    color: #7bb4ff;
    font-size: 2rem;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .patch-card {
        padding: 32px 24px;
    }

    .patch-header-section {
        grid-template-columns: 1fr;
    }

    .patch-controls {
        grid-template-columns: 1fr;
    }

    .patch-filter-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .patch-filter {
        flex: 0 0 auto;
    }

    .patch-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .patch-title {
        font-size: 1.9rem;
    }

    .patch-header {
        padding: 16px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .patch-header-title {
        font-size: 1rem;
    }

    .patch-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .patch-content {
        padding: 0 18px;
    }

    .patch-item.open .patch-content {
        padding: 18px;
    }
}

@media (max-width: 576px) {
    .patch-page {
        padding: 20px 12px 40px;
    }

    .patch-card {
        padding: 24px 18px;
    }

    .patch-summary {
        grid-template-columns: 1fr;
    }

    .patch-title {
        font-size: 1.7rem;
    }

    .patch-header {
        padding: 14px 16px;
    }
}

