/**
 * 2026 NextLevel PC
 * Module: nlgamefps
 * Modern, Responsive & Interactive Gaming FPS Benchmark Stylesheet
 */

:root {
    --nl-fps-purple: #5B2599;
    --nl-fps-purple-hover: #481d7a;
    --nl-fps-purple-subtle: #f6f0fb;
    --nl-fps-purple-border: rgba(91, 37, 153, 0.18);
    --nl-fps-ink: #0f172a;
    --nl-fps-muted: #64748b;
    --nl-fps-card-bg: #ffffff;
    --nl-fps-border: #e2e8f0;
    --nl-fps-high: #10b981;
    --nl-fps-high-dark: #059669;
    --nl-fps-high-bg: #ecfdf5;
    --nl-fps-mid: #7c3aed;
    --nl-fps-mid-dark: #5B2599;
    --nl-fps-mid-bg: #f5f3ff;
    --nl-fps-low: #f59e0b;
    --nl-fps-low-dark: #d97706;
    --nl-fps-low-bg: #fffbeb;
    --nl-fps-poor: #ef4444;
    --nl-fps-poor-dark: #dc2626;
    --nl-fps-poor-bg: #fef2f2;
}

/* Card Container */
.nl-fps-card {
    margin: 22px 0 20px 0;
    padding: 20px 22px 18px;
    background: var(--nl-fps-card-bg);
    border: 1px solid var(--nl-fps-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(91, 37, 153, 0.06), 0 2px 8px -1px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    color: var(--nl-fps-ink);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
}

.nl-fps-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #5B2599 0%, #8b5cf6 50%, #06b6d4 100%);
}

.nl-fps-card:hover {
    border-color: rgba(91, 37, 153, 0.3);
    box-shadow: 0 8px 28px -4px rgba(91, 37, 153, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.05);
}

/* Header */
.nl-fps-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.nl-fps-head-info {
    flex: 1 1 30px;
    min-width: 0;
}

.nl-fps-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.nl-fps-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--nl-fps-purple-subtle);
    color: var(--nl-fps-purple);
    border-radius: 9px;
    flex-shrink: 0;
    border: 1px solid rgba(91, 37, 153, 0.15);
}

.nl-fps-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--nl-fps-ink);
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.nl-fps-live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--nl-fps-high);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: nlFpsPulse 2s infinite;
}

@keyframes nlFpsPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Hardware Pills */
.nl-fps-hardware-pills {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.nl-hw-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1px;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.nl-hw-pill svg {
    flex-shrink: 0;
}

.nl-hw-gpu {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.nl-hw-gpu strong {
    font-weight: 700;
    color: #047857;
}

.nl-hw-gpu.nl-hw-igpu {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}

.nl-hw-gpu.nl-hw-igpu strong {
    color: #15803d;
}

.nl-fps-igpu-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 12px;
    border-radius: 9px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
}

.nl-fps-igpu-notice svg {
    flex-shrink: 0;
    color: #16a34a;
}

.nl-hw-cpu {
    background: var(--nl-fps-purple-subtle);
    color: var(--nl-fps-purple);
    border: 1px solid rgba(91, 37, 153, 0.2);
}

.nl-hw-preset {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    font-size: 11px;
}

/* Segmented Resolution Switcher */
.nl-fps-res-switch {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 12px;
    border: 1px solid var(--nl-fps-border);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.nl-res-btn {
    border: 0;
    background: transparent;
    padding: 6px 14px;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    outline: none;
    line-height: 1.1;
    min-width: 68px;
}

.nl-res-name {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.1px;
}

.nl-res-sub {
    font-size: 9.5px;
    font-weight: 600;
    opacity: 0.75;
    margin-top: 2px;
    text-transform: uppercase;
}

.nl-res-btn:hover:not(.is-active) {
    color: var(--nl-fps-ink);
    background: rgba(255, 255, 255, 0.6);
}

.nl-res-btn.is-active {
    background: linear-gradient(135deg, #5B2599 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(91, 37, 153, 0.35);
    transform: translateY(-1px);
}

.nl-res-btn.is-active .nl-res-sub {
    color: #e9d5ff;
    opacity: 0.95;
}

/* Average Summary Bar */
.nl-fps-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    margin-bottom: 14px;
    background: linear-gradient(90deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 10px;
    font-size: 12.5px;
    color: #581c87;
    flex-wrap: wrap;
}

.nl-fps-summary-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.nl-fps-summary-left svg {
    color: #7c3aed;
    flex-shrink: 0;
}

.nl-fps-avg-val {
    font-size: 14px;
    font-weight: 800;
    color: #5B2599;
}

.nl-badge-tier {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.nl-badge-tier.is-high {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.nl-badge-tier.is-mid {
    background: #ede9fe;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.nl-badge-tier.is-low {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.nl-badge-tier.is-poor {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Games List Container */
.nl-fps-games-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual Game Row */
.nl-fps-game-row {
    display: grid;
    grid-template-columns: minmax(0, 195px) minmax(0, 1fr) 95px;
    align-items: center;
    gap: 14px;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 11px;
    transition: all 0.2s ease;
}

.nl-fps-game-row:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    transform: translateX(2px);
}

/* Game Media */
.nl-fps-game-media {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.nl-fps-game-thumb {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.nl-fps-game-meta {
    min-width: 0;
    overflow: hidden;
}

.nl-fps-game-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--nl-fps-ink);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nl-fps-game-genre {
    display: block;
    font-size: 11px;
    color: var(--nl-fps-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Performance Bar Track & Fill */
.nl-fps-bar-wrapper {
    width: 100%;
}

.nl-fps-bar-track {
    width: 100%;
    height: 9px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.nl-fps-bar-fill {
    height: 100%;
    border-radius: 9999px;
    width: 0%;
    transition: width 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

/* Tier Bar Colors */
.nl-tier-high .nl-fps-bar-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.nl-tier-mid .nl-fps-bar-fill {
    background: linear-gradient(90deg, #8b5cf6 0%, #5B2599 100%);
    box-shadow: 0 0 8px rgba(91, 37, 153, 0.4);
}

.nl-tier-low .nl-fps-bar-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.nl-tier-poor .nl-fps-bar-fill {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* Score Column */
.nl-fps-score-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
}

.nl-fps-counter {
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}

.nl-tier-high .nl-fps-counter {
    color: #047857;
}

.nl-tier-mid .nl-fps-counter {
    color: #5B2599;
}

.nl-tier-low .nl-fps-counter {
    color: #b45309;
}

.nl-tier-poor .nl-fps-counter {
    color: #b91c1c;
}

.nl-fps-unit {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--nl-fps-muted);
    margin-left: 2px;
}

.nl-fps-status-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 9999px;
    line-height: 1.2;
    display: inline-block;
}

.nl-tier-high .nl-fps-status-pill {
    background: #d1fae5;
    color: #065f46;
}

.nl-tier-mid .nl-fps-status-pill {
    background: #ede9fe;
    color: #5b21b6;
}

.nl-tier-low .nl-fps-status-pill {
    background: #fef3c7;
    color: #92400e;
}

.nl-tier-poor .nl-fps-status-pill {
    background: #fee2e2;
    color: #991b1b;
}

/* Legend & Footer */
.nl-fps-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.nl-fps-legend {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--nl-fps-muted);
    font-weight: 500;
}

.nl-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nl-legend-item .nl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.nl-legend-item.is-high .nl-dot {
    background: #059669;
}

.nl-legend-item.is-mid .nl-dot {
    background: #5B2599;
}

.nl-legend-item.is-low .nl-dot {
    background: #d97706;
}

.nl-legend-item.is-poor .nl-dot {
    background: #dc2626;
}

.nl-fps-disclaimer {
    margin: 8px 0 0 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.nl-fps-disclaimer svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #94a3b8;
}

/* Loading shimmer state */
.nl-fps-card.is-loading .nl-fps-games-container {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Responsive styling */
@media (max-width: 640px) {
    .nl-fps-card {
        padding: 16px 14px 14px;
        margin: 16px 0;
        border-radius: 14px;
    }

    .nl-fps-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .nl-fps-res-switch {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .nl-res-btn {
        min-width: 0;
        padding: 6px 4px;
    }

    .nl-fps-game-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 10px;
    }

    .nl-fps-bar-wrapper {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-top: 2px;
    }

    .nl-fps-game-thumb {
        width: 36px;
        height: 36px;
    }

    .nl-fps-game-title {
        font-size: 12.5px;
    }

    .nl-fps-legend {
        gap: 10px;
        font-size: 11px;
    }
}