/* ============================================
   Screen Refresh Rate Tester Styles
   ============================================ */

.refresh-rate-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem 1rem;
    min-height: 400px;
}

/* UFO Animation Track */
.ufo-track {
    width: 100%;
    max-width: 600px;
    height: 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.ufo-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4a90e2, transparent);
    opacity: 0.5;
}

.ufo-icon {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(74, 144, 226, 0.8));
    transition: none;
}

/* Result Container */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    padding: 2rem;
    min-height: 200px;
}

.result-container.hidden {
    display: none;
}

/* Confetti Container */
.confetti-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 300px;
    pointer-events: none;
    overflow: visible;
    z-index: 10;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(300px) rotate(720deg);
    }
}

/* Badge Container */
.badge-container {
    perspective: 1000px;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.badge:hover {
    transform: scale(1.05);
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hz-value {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

/* Badge Tiers */
.badge-bronze {
    background: linear-gradient(145deg, #8d6e63 0%, #5d4037 50%, #3e2723 100%);
    color: #efebe9;
    box-shadow:
        0 10px 30px rgba(93, 64, 55, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.badge-silver {
    background: linear-gradient(145deg, #cfd8dc 0%, #90a4ae 50%, #607d8b 100%);
    color: #263238;
    box-shadow:
        0 10px 30px rgba(96, 125, 139, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.badge-gold {
    background: linear-gradient(145deg, #ffd54f 0%, #ffb300 50%, #ff8f00 100%);
    color: #3e2723;
    box-shadow:
        0 0 30px rgba(255, 179, 0, 0.6),
        0 0 60px rgba(255, 179, 0, 0.4),
        0 0 90px rgba(255, 179, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
    animation: badge-glow 1.5s ease-in-out infinite alternate;
}

@keyframes badge-glow {
    0% {
        box-shadow:
            0 0 30px rgba(255, 179, 0, 0.6),
            0 0 60px rgba(255, 179, 0, 0.4),
            0 0 90px rgba(255, 179, 0, 0.2),
            inset 0 2px 0 rgba(255, 255, 255, 0.5);
    }

    100% {
        box-shadow:
            0 0 50px rgba(255, 179, 0, 0.8),
            0 0 100px rgba(255, 179, 0, 0.6),
            0 0 150px rgba(255, 179, 0, 0.3),
            inset 0 2px 0 rgba(255, 255, 255, 0.5);
    }
}

/* Result Text */
.result-text {
    font-size: 1.2rem;
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
    color: #495057;
}

.result-text.elite {
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #ff8f00, #ffd54f, #ff8f00);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shine 2s linear infinite;
}

@keyframes text-shine {
    to {
        background-position: 200% center;
    }
}

/* Controls */
.controls-toolbar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-glow {
    animation: btn-glow 2s ease-in-out infinite;
}

@keyframes btn-glow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(74, 144, 226, 0.7);
    }
}

/* Testing State */
.refresh-rate-section.testing .ufo-icon {
    animation: ufo-fly linear infinite;
}

@keyframes ufo-fly {
    0% {
        left: 0;
    }

    100% {
        left: calc(100% - 50px);
    }
}

/* Responsive */
@media (max-width: 500px) {
    .ufo-track {
        max-width: 100%;
        height: 60px;
    }

    .ufo-icon {
        font-size: 2rem;
    }

    .badge {
        width: 150px;
        height: 150px;
    }

    .badge-icon {
        font-size: 2.5rem;
    }

    .hz-value {
        font-size: 1.5rem;
    }

    .result-text.elite {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
}