.builder-fps-preview .res-card.res-selected {
    border-color: var(--accent);
    background: rgba(74, 159, 212, 0.1);
    box-shadow: 0 0 0 2px rgba(74, 159, 212, 0.2);
}

.builder-fps-preview .res-name {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: clamp(0.25rem, 1vw, 0.375rem);
    font-weight: 600;
}

/* FPS Row - Horizontal layout */
.builder-fps-preview .res-fps-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* FPS Value */
.builder-fps-preview .res-fps {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

/* Status Badge */
.builder-fps-preview .res-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.builder-fps-preview .status-excellent {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.builder-fps-preview .status-good {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.builder-fps-preview .status-medium {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.builder-fps-preview .status-poor {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

/* Footer Link */
.fps-preview-footer {
    margin-top: clamp(1.5rem, 3vw, 2rem);
    text-align: center;
    padding-top: clamp(1rem, 2vw, 1.5rem);
    border-top: 1px solid var(--border);
}

.btn-full-calculator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: clamp(0.6rem, 1.5vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--accent);
    font-size: clamp(0.8125rem, 1.5vw, 0.9rem);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-full-calculator:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile Bottleneck Indicator - hidden on desktop */
.fps-mobile-bottleneck {
    display: none;
}

/* Responsive adjustments - mobile/tablet */
@media (max-width: 1024px) {
    /* Hide preview header and hardware info on mobile/tablet */
    .builder-fps-preview .fps-preview-header,
    .builder-fps-preview .fps-hardware-info {
        display: none !important;
    }

    /* Show simple mobile bottleneck indicator */
    .fps-mobile-bottleneck {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        margin-top: 0.75rem;
        background: var(--bg-tertiary);
        border: 1px solid var(--border);
        border-radius: 8px;
        font-size: 0.8125rem;
        color: var(--text-secondary);
    }

    .fps-mobile-bottleneck__label {
        color: var(--text-muted);
    }

    .fps-mobile-bottleneck__gpu {
        color: var(--success);
    }

    .fps-mobile-bottleneck__gpu strong {
        font-weight: 600;
    }

    .fps-mobile-bottleneck__sep {
        color: var(--text-muted);
        opacity: 0.5;
    }

    .fps-mobile-bottleneck__cpu {
        color: var(--accent);
    }

    .fps-mobile-bottleneck__cpu strong {
        font-weight: 600;
    }

    /* Make FPS output cards 2-column on mobile (without bottleneck) */
    .builder-fps-preview .fps-output-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .builder-fps-preview {
        /* Improved scroll behavior on mobile */
        scroll-behavior: smooth;
    }

    .hardware-separator {
        display: none;
    }

    .fps-config-box {
        position: relative;
        z-index: 8;
    }

    /* Game cover - significantly larger on mobile for better visibility */
    .fps-preview-game .game-cover-placeholder {
        max-width: clamp(140px, 60vw, 200px);
    }

    .fps-preview-game .game-cover-container {
        max-width: clamp(140px, 60vw, 200px);
    }

    /* Improve grid layout on mobile - stack more naturally */
    .fps-preview-grid {
        grid-template-columns: 1fr;
        gap: clamp(1rem, 3vw, 1.5rem);
    }

    /* Better touch targets on mobile */
    .fps-preview-game .btn-select-game,
    .fps-preview-game .btn-wijzig-game,
    .fps-preview-settings .btn-calculate {
        min-height: 44px;
        min-width: 44px;
    }

    /* Improve game card spacing on mobile */
    .fps-preview-game .game-card {
        padding: clamp(0.75rem, 2vw, 1.25rem);
    }

    /* Settings should have better spacing on mobile */
    .fps-preview-settings .setting-row {
        gap: clamp(0.25rem, 1vw, 0.5rem);
    }

    /* Footer sticky on mobile for easy access to full calculator */
    .fps-preview-footer {
        position: sticky;
        bottom: 0;
        z-index: 8;
        background: var(--bg-primary);
        margin-left: calc(-1 * (100vw - 100%));
        margin-right: calc(-1 * (100vw - 100%));
        padding-left: clamp(0.75rem, 2vw, 1rem);
        padding-right: clamp(0.75rem, 2vw, 1rem);
        padding-top: clamp(0.75rem, 2vw, 1rem);
        padding-bottom: clamp(0.75rem, 2vw, 1rem);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
        animation: slideUp 0.3s ease;
        transition: all 0.3s ease;
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Respect user motion preferences */
    @media (prefers-reduced-motion: reduce) {
        .fps-preview-footer {
            animation: none;
        }
    }

    /* Full calculator button - touch-friendly on mobile */
    .btn-full-calculator {
        display: flex;
        width: 100%;
        min-height: 44px;
        justify-content: center;
        align-items: center;
        transition: all 0.2s ease;
    }

    @media (prefers-reduced-motion: reduce) {
        .btn-full-calculator {
            transition: none;
        }
    }
}

/* ==========================================================================
   FPS PREVIEW - CALCULATING STATE
   ========================================================================== */

.fps-calculating-state {
    margin-top: clamp(1rem, 3vw, 1.5rem);
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 3vw, 1.5rem);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calculating-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1rem);
}

.calculating-spinner {
    width: clamp(48px, 10vw, 64px);
    height: clamp(48px, 10vw, 64px);
    margin-bottom: clamp(0.5rem, 1vw, 1rem);
}

.calculating-spinner .spinner-ring {
    width: 100%;
    height: 100%;
    animation: spin 1.2s linear infinite;
}

.calculating-spinner .spinner-ring circle:nth-child(2) {
    transform-origin: center;
}

.calculating-text {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.01em;
}

.calculating-text .dots {
    display: inline-block;
}

.calculating-text .dots span {
    animation: blink 1.4s infinite;
    animation-fill-mode: both;
    display: inline-block;
}

.calculating-text .dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.calculating-text .dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.calculating-message {
    font-size: clamp(0.8125rem, 1.5vw, 0.875rem);
    color: var(--text-secondary);
    margin: clamp(0.5rem, 1vw, 0.75rem) 0 0;
    max-width: 340px;
    min-height: 1.5em;
    transition: opacity 0.3s ease;
    line-height: 1.4;
}

/* Message fade transitions */
.message-enter {
    opacity: 0;
}

.message-leave {
    opacity: 0;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blink {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .calculating-spinner .spinner-ring {
        animation: none;
    }

    .calculating-text .dots span {
        animation: none;
        opacity: 1;
    }
}

/* ==========================================================================
   FPS PREVIEW DROPDOWNS
   ========================================================================== */

.fps-dropdown-wrapper {
    position: relative;
    width: 100%;
}

.fps-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    transition: border-color 0.15s;
}

.fps-dropdown-trigger:hover {
    border-color: var(--accent);
}

.fps-dropdown-trigger.is-open {
    border-color: var(--accent);
    border-radius: 6px 6px 0 0;
}

.fps-dropdown-trigger .dropdown-arrow {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.fps-dropdown-trigger.is-open .dropdown-arrow {
    transform: rotate(180deg);
}

.fps-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    max-height: 280px;
}

.fps-dropdown-menu .dropdown-options {
    flex: 1;
    overflow-y: auto;
}

.fps-dropdown-menu .dropdown-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.fps-dropdown-menu .dropdown-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.fps-dropdown-menu .dropdown-option.is-selected {
    background: rgba(var(--accent-rgb, 74, 159, 212), 0.1);
    color: var(--accent);
}

/* Aspect Ratio Tabs */
.fps-dropdown-menu .aspect-ratio-tabs {
    display: flex;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    background: var(--bg-secondary);
}

.fps-dropdown-menu .aspect-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fps-dropdown-menu .aspect-tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.fps-dropdown-menu .aspect-tab.active {
    background: rgba(var(--accent-rgb, 74, 159, 212), 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.fps-dropdown-menu .aspect-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 2px;
    color: white;
}

/* Resolution option labels */
.fps-dropdown-menu .res-label {
    flex: 1;
}

.fps-dropdown-menu .res-aspect {
    font-size: 0.6875rem;
    color: var(--text-muted);
    padding: 0.125rem 0.375rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
}

/* RAM Status Icons */
.ram-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding-left: 0.5rem;
}

.ram-status-icon svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ram-status-icon .icon-insufficient {
    color: var(--error, #f87171);
    filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.5));
}

.ram-status-icon .icon-sufficient {
    color: var(--warning, #fbbf24);
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.ram-status-icon .icon-optimal {
    color: var(--success, #4ade80);
    filter: drop-shadow(0 0 4px rgba(74, 222, 128, 0.5));
}

/* RAM Requirements Text */
.setting-row .ram-requirements {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.setting-row .ram-requirements strong {
    color: var(--text-secondary);
}

.setting-row .ram-sep {
    margin: 0 0.375rem;
    opacity: 0.5;
}

