/* ==========================================================================
   FPS RESULTS SECTION - Clean Design
   Elegant visual display with subtle accents
   ========================================================================== */

.fps-results-section {
    margin-top: clamp(2rem, 4vw, 2.5rem);
}

/* Empty State */
.fps-empty-state {
    text-align: center;
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 12px;
    color: #808080;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

html.light .fps-empty-state {
    background: #ffffff;
    border-color: #e0e0e0;
    color: #666666;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.empty-icon {
    margin-bottom: clamp(0.75rem, 1.5vw, 1rem);
    opacity: 0.35;
}

.empty-icon svg {
    width: 44px;
    height: 44px;
}

.fps-empty-state h3 {
    color: #c0c0c0;
    margin: 0 0 clamp(0.375rem, 0.75vw, 0.5rem);
    font-size: clamp(1rem, 2vw + 0.2rem, 1.25rem);
    font-weight: 600;
}

html.light .fps-empty-state h3 {
    color: #333333;
}

.fps-empty-state p {
    margin: 0;
    font-size: clamp(0.8125rem, 1.25vw + 0.1rem, 0.875rem);
    max-width: 380px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Loading State */
.fps-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

html.light .fps-loading-state {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.loading-spinner {
    position: relative;
    width: 56px;
    height: 56px;
    margin-bottom: clamp(1rem, 2vw, 1.25rem);
}

.loading-spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #333333;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

html.light .loading-spinner::before {
    border-color: #e0e0e0;
    border-top-color: var(--accent);
}

.loading-spinner::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid transparent;
    border-top-color: rgba(var(--accent-rgb), 0.4);
    border-radius: 50%;
    animation: spin 0.75s linear infinite reverse;
}

.spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent);
}

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

.fps-loading-state h3 {
    font-size: clamp(1rem, 2vw + 0.2rem, 1.25rem);
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 clamp(0.375rem, 0.75vw, 0.5rem);
}

html.light .fps-loading-state h3 {
    color: #1a1a1a;
}

.loading-dots span {
    animation: blink 1.4s infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

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

.fps-loading-state p {
    color: #808080;
    margin: 0;
    max-width: 300px;
    font-size: clamp(0.8125rem, 1.25vw + 0.1rem, 0.875rem);
    line-height: 1.6;
}

html.light .fps-loading-state p {
    color: #666666;
}

/* ==========================================================================
   RESULTS PANEL - Clean elevated card
   ========================================================================== */

.fps-results-panel {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 16px;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

html.light .fps-results-panel {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.fps-results-panel:hover {
    border-color: #404040;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

html.light .fps-results-panel:hover {
    border-color: #c0c0c0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.fps-results-panel.is-animating {
    animation: fadeInUp 0.4s ease-out;
}

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

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

/* RAM Warning */
.fps-ram-warning {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.25vw, 0.75rem);
    padding: clamp(0.625rem, 1.25vw, 0.875rem) clamp(0.875rem, 1.5vw, 1rem);
    background: rgba(var(--warning-rgb), 0.06);
    border: 1px solid rgba(var(--warning-rgb), 0.2);
    border-left: 2px solid var(--warning);
    border-radius: 10px;
    margin-bottom: clamp(1.125rem, 2.25vw, 1.5rem);
    font-size: clamp(0.75rem, 1.1vw + 0.1rem, 0.8125rem);
    color: #e0e0e0;
    line-height: 1.5;
}

html.light .fps-ram-warning {
    background: #fffbf5;
    color: #444444;
}

.fps-ram-warning svg {
    color: var(--warning);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* FPS Output */
.fps-output {
    margin-bottom: clamp(1.125rem, 2.25vw, 1.5rem);
}

.fps-output-header {
    margin-bottom: clamp(0.75rem, 1.5vw, 1rem);
}

.fps-output-title {
    display: block;
    font-size: clamp(0.9375rem, 1.75vw + 0.2rem, 1.125rem);
    font-weight: 700;
    color: #ffffff;
}

html.light .fps-output-title {
    color: #1a1a1a;
}

.fps-output-subtitle {
    font-size: clamp(0.75rem, 1.1vw + 0.1rem, 0.8125rem);
    color: #808080;
    margin-top: 0.25rem;
}

html.light .fps-output-subtitle {
    color: #666666;
}

/* ==========================================================================
   FPS CARDS - Clean display with color accents
   ========================================================================== */

.fps-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2vw, 1.25rem);
}

@media (min-width: 480px) {
    .fps-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.fps-card {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

html.light .fps-card {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.fps-card:hover {
    border-color: #404040;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

html.light .fps-card:hover {
    border-color: #c0c0c0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

/* Accent top border */
.fps-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #333333;
    transition: background-color 0.2s ease;
}

/* Average FPS Card - Green accent */
.fps-card--avg::before {
    background: var(--success);
}

.fps-card--avg:hover {
    border-color: rgba(var(--success-rgb), 0.4);
}

/* Minimum FPS Card - Orange accent */
.fps-card--min::before {
    background: var(--warning);
}

.fps-card--min:hover {
    border-color: rgba(var(--warning-rgb), 0.4);
}

/* FPS Value - Large numbers */
.fps-value {
    display: block;
    font-size: clamp(2.5rem, 8vw + 0.4rem, 4rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.375rem;
    letter-spacing: -0.04em;
}

.fps-card--avg .fps-value {
    color: var(--success);
}

.fps-card--min .fps-value {
    color: var(--warning);
}

.fps-unit {
    font-size: clamp(0.6875rem, 1vw, 0.75rem);
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

html.light .fps-unit {
    color: #666666;
}

/* FPS Progress Bar */
.fps-bar {
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    margin: clamp(1rem, 2vw, 1.25rem) 0 clamp(0.5rem, 1vw, 0.75rem);
    overflow: hidden;
    position: relative;
}

html.light .fps-bar {
    background: #e0e0e0;
}

.fps-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

.fps-bar-fill--green {
    background: var(--success);
}

.fps-bar-fill--orange {
    background: var(--warning);
}

.fps-card-label {
    font-size: clamp(0.6875rem, 1vw, 0.75rem);
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

html.light .fps-card-label {
    color: #666666;
}

/* ==========================================================================
   RESOLUTION GRID - Clean selection cards
   ========================================================================== */

.fps-resolution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: clamp(0.5rem, 1.25vw, 1rem);
}

/* Compact variant for 3 main resolutions */
.fps-resolution-grid--compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: clamp(0.625rem, 1.75vw, 1.125rem);
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .fps-resolution-grid--compact {
        grid-template-columns: repeat(3, 1fr);
        max-width: 560px;
    }
}

.res-card {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 10px;
    padding: clamp(0.875rem, 2vw, 1.125rem);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

html.light .res-card {
    background: #ffffff;
    border-color: #e0e0e0;
}

.res-card:hover {
    border-color: #505050;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

html.light .res-card:hover {
    border-color: #b0b0b0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.res-card.is-selected {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
    box-shadow: 0 0 0 2px var(--accent);
}

.res-label {
    display: block;
    font-size: 0.625rem;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.375rem;
    font-weight: 700;
}

html.light .res-label {
    color: #666666;
}

.res-fps {
    display: block;
    font-size: clamp(1.25rem, 2.5vw + 0.2rem, 1.5rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

html.light .res-fps {
    color: #1a1a1a;
}

.res-card.is-selected .res-fps {
    color: var(--accent);
}

.res-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-excellent {
    background: rgba(var(--success-rgb), 0.1);
    color: var(--success);
    border: 1px solid rgba(var(--success-rgb), 0.3);
}

.status-good {
    background: rgba(var(--success-rgb), 0.08);
    color: var(--success);
    border: 1px solid rgba(var(--success-rgb), 0.2);
}

.status-medium {
    background: rgba(var(--warning-rgb), 0.08);
    color: var(--warning);
    border: 1px solid rgba(var(--warning-rgb), 0.2);
}

.status-poor {
    background: rgba(var(--error-rgb), 0.08);
    color: var(--error);
    border: 1px solid rgba(var(--error-rgb), 0.2);
}

/* ==========================================================================
   PERFORMANCE TIPS - Contextual help
   ========================================================================== */

.performance-tips {
    margin-top: clamp(1.25rem, 2.75vw, 2rem);
    padding: clamp(0.875rem, 1.75vw, 1.125rem);
    background: #222222;
    border: 1px solid #333333;
    border-radius: 10px;
}

html.light .performance-tips {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.performance-tips__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.8125rem, 1.25vw + 0.1rem, 0.875rem);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.625rem;
}

html.light .performance-tips__title {
    color: #1a1a1a;
}

.performance-tips__title svg {
    color: #808080;
    width: 16px;
    height: 16px;
}

.performance-tips__list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.performance-tips__list li {
    position: relative;
    padding-left: 1.125rem;
    margin-bottom: 0.5rem;
    font-size: clamp(0.75rem, 1.1vw + 0.1rem, 0.8125rem);
    color: #b0b0b0;
    line-height: 1.6;
}

html.light .performance-tips__list li {
    color: #555555;
}

.performance-tips__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    background: #606060;
    border-radius: 50%;
}

html.light .performance-tips__list li::before {
    background: #b0b0b0;
}

.performance-tips__list li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   BENCHMARK SOURCE - Attribution
   ========================================================================== */

.benchmark-source {
    margin-top: clamp(1.125rem, 2.25vw, 1.5rem);
    padding-top: clamp(0.875rem, 1.75vw, 1.125rem);
    border-top: 1px solid #333333;
    font-size: clamp(0.6875rem, 1vw, 0.75rem);
    color: #808080;
    text-align: center;
}

html.light .benchmark-source {
    border-top-color: #e0e0e0;
    color: #666666;
}

.benchmark-source a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.benchmark-source a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ==========================================================================
   REDUCED MOTION SUPPORT
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .fps-card,
    .fps-results-panel,
    .res-card,
    .fps-bar-fill {
        transition: none;
    }

    .loading-spinner::before,
    .loading-spinner::after {
        animation: none;
    }

    .fps-results-panel.is-animating {
        animation: none;
    }
}
