/* Skilltester - DSA Quest style overhaul */

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    color: white;
    font-family: 'Inter', sans-serif;
    padding-bottom: 50px;
    position: relative;
}

/* Animated background */
.game-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: skilltesterBgPulse 8s ease-in-out infinite;
}

@keyframes skilltesterBgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.game-container .screen {
    display: none;
}

.game-container .screen.active {
    display: block;
    animation: skilltesterFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes skilltesterFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Main menu */
#main-menu h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #00ffff;
    font-weight: 800;
    text-shadow:
        0 0 10px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(0, 255, 255, 0.3);
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.level-btn {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 30, 0.95) 100%);
    border: 2px solid transparent;
    padding: 28px;
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.level-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.level-btn:hover::before {
    left: 100%;
}

.level-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 300% 300%;
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
    animation: skilltesterGradientShift 3s ease infinite;
}

@keyframes skilltesterGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.level-btn:hover::after {
    opacity: 1;
}

.level-btn:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: #00ffff;
    box-shadow:
        0 16px 48px rgba(0, 255, 255, 0.4),
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.level-btn:active {
    transform: translateY(-4px) scale(1.01);
}

.level-btn h3 {
    margin: 0 0 12px 0;
    color: #00ffff;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow:
        0 0 10px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(0, 255, 255, 0.3);
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.level-btn:hover h3 {
    color: #ffff00;
    text-shadow:
        0 0 15px rgba(255, 255, 0, 0.7),
        0 0 30px rgba(255, 255, 0, 0.4);
    transform: translateX(5px);
}

.level-btn p {
    margin: 0;
    color: #bcdcff;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

.level-btn:hover p {
    color: #ffffff;
}

/* Main menu cards - same enhanced card style, left-aligned */
#main-menu .level-btn h3 {
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Test HUD - DSA-style */
.benchmark-test-hud {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 24px 32px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 30, 0.95) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px;
    font-family: 'JetBrains Mono', monospace;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.benchmark-test-hud::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: skilltesterScanline 2s linear infinite;
}

@keyframes skilltesterScanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.benchmark-test-hud h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: #00ffff;
    text-shadow:
        0 0 10px rgba(0, 255, 255, 0.6),
        0 0 20px rgba(0, 255, 255, 0.4);
    letter-spacing: 1px;
}

.reaction-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.reaction-stats span:first-child {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ff00ff;
    text-shadow:
        0 0 10px rgba(255, 0, 255, 0.6),
        0 0 20px rgba(255, 0, 255, 0.4);
    padding: 8px 16px;
    background: rgba(255, 0, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 0, 255, 0.3);
}

.reaction-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #bcdcff;
}

.reaction-zone {
    position: relative;
    width: 100%;
    min-height: min(60vh, 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid rgba(51, 51, 51, 0.8);
    border-radius: 16px;
    transition: background-color 0.05s ease, border-color 0.2s ease, box-shadow 0.3s;
    user-select: none;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 0 50px rgba(0, 255, 255, 0.03);
}

.reaction-zone.reaction-wait {
    background: #1a0a0a;
    border-color: #660000;
}

.reaction-zone.reaction-ready {
    background: #0a1a0a;
    border-color: #006600;
}

.reaction-zone.reaction-go {
    background: #00aa44;
    border-color: #00ff66;
    box-shadow: 0 0 60px rgba(0, 255, 100, 0.5);
}

.reaction-zone.reaction-too-early {
    background: #331100;
    border-color: #cc6600;
}

.reaction-message {
    font-size: clamp(1.25rem, 4vw, 2rem);
    font-weight: 700;
    color: #bcdcff;
    text-align: center;
    padding: 20px;
}

.reaction-zone.reaction-go .reaction-message {
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.reaction-zone.reaction-too-early .reaction-message {
    color: #ffaa00;
}

.reaction-result-ms {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
}

.reaction-result-ms span {
    font-size: 0.5em;
    font-weight: 600;
    color: #bcdcff;
    margin-left: 4px;
}

/* Number Memory test */
.number-zone {
    min-height: min(50vh, 320px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: linear-gradient(135deg, rgba(13, 13, 13, 0.95) 0%, rgba(8, 8, 18, 0.95) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 50px rgba(0, 255, 255, 0.05);
}

.number-content {
    text-align: center;
}

.number-content--hidden {
    display: none;
}

.number-message {
    font-size: 1.25rem;
    color: #bcdcff;
    margin: 0 0 16px 0;
}

.number-message.number-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    letter-spacing: 0.05em;
}

.number-mode-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 8px 0;
}

.number-mode-label {
    font-size: 14px;
    color: #bcdcff;
}

.number-mode-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, rgba(51, 51, 51, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
    color: #bcdcff;
    border: 2px solid rgba(0, 255, 255, 0.4);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.number-mode-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.2) 100%);
    color: #00ffff;
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.number-mode-btn--active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 200, 255, 0.3) 100%);
    color: #00ffff;
    border-color: #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
}

.number-mode-hint {
    font-size: 13px;
    color: #888;
    margin: 0 0 16px 0;
}

.number-input-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 320px;
}

.number-input-wrap--hidden {
    display: none;
}

.number-input-label {
    font-size: 1rem;
    color: #bcdcff;
}

.number-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 30, 0.95) 100%);
    border: 2px solid rgba(0, 255, 255, 0.4);
    color: #00ffff;
    border-radius: 10px;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.number-input:focus {
    border-color: #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.number-input::placeholder {
    color: #666;
}

.number-gameover {
    text-align: center;
}

.number-gameover--hidden {
    display: none;
}

.number-gameover-message {
    font-size: 1.1rem;
    color: #bcdcff;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.number-gameover-message strong {
    color: #00ffff;
}

/* Pitch Test */
.pitch-zone {
    min-height: min(50vh, 320px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: linear-gradient(135deg, rgba(13, 13, 13, 0.95) 0%, rgba(8, 8, 18, 0.95) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 50px rgba(0, 255, 255, 0.05);
}

.pitch-message {
    font-size: 1.1rem;
    color: #bcdcff;
    margin: 0 0 16px 0;
    text-align: center;
}

.pitch-mode-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 8px 0;
}

.pitch-mode-label {
    font-size: 14px;
    color: #bcdcff;
}

.pitch-mode-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, rgba(51, 51, 51, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
    color: #bcdcff;
    border: 2px solid rgba(0, 255, 255, 0.4);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pitch-mode-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.2) 100%);
    color: #00ffff;
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.pitch-mode-btn--active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 200, 255, 0.3) 100%);
    color: #00ffff;
    border-color: #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
}

.pitch-mode-hint {
    font-size: 13px;
    color: #888;
    margin: 0 0 16px 0;
    text-align: center;
}

.pitch-chord-size-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px 0 8px 0;
}

.pitch-chord-size-wrap--hidden {
    display: none;
}

.pitch-playing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pitch-playing--hidden {
    display: none;
}

.pitch-instruction {
    font-size: 1.1rem;
    color: #bcdcff;
    margin: 0;
}

.pitch-guess-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pitch-guess-wrap--hidden {
    display: none;
}

.pitch-guess-label {
    font-size: 1rem;
    color: #bcdcff;
    margin: 0;
}

.pitch-notes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 420px;
}

.pitch-note-btn {
    min-width: 48px;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(34, 34, 34, 0.9) 0%, rgba(25, 25, 25, 0.9) 100%);
    color: #bcdcff;
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pitch-note-btn--selected {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 200, 255, 0.3) 100%);
    color: #000;
    border-color: #00ffff;
    box-shadow: 0 0 28px rgba(0, 255, 255, 0.7);
    transform: translateY(-2px) scale(1.05);
}

.pitch-note-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.25) 0%, rgba(0, 200, 255, 0.25) 100%);
    color: #00ffff;
    border-color: #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.05);
}

.pitch-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pitch-feedback--hidden {
    display: none;
}

.pitch-feedback-text {
    font-size: 1.1rem;
    color: #bcdcff;
    margin: 0;
}

.pitch-feedback-text strong {
    color: #00ffff;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, rgba(68, 68, 68, 0.8) 0%, rgba(50, 50, 50, 0.8) 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.btn-small:hover {
    color: #00ffff;
    border-color: #00ffff;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.2) 100%);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Consistency test */
.consistency-duration-wrap {
    margin: 0;
}

.consistency-keys-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.consistency-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.consistency-key-btn {
    min-width: 44px;
    padding: 8px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(51, 51, 51, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
    border: 2px solid rgba(0, 255, 255, 0.4);
    color: #00ffff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.consistency-key-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.2) 100%);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.consistency-key-btn--listening {
    animation: consistencyKeyPulse 0.8s ease-in-out infinite;
}

@keyframes consistencyKeyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(0, 255, 255, 0); }
}

.consistency-zone {
    min-height: min(50vh, 320px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: linear-gradient(135deg, rgba(13, 13, 13, 0.95) 0%, rgba(8, 8, 18, 0.95) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px;
    outline: none;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 50px rgba(0, 255, 255, 0.05);
}

.consistency-instruction {
    font-size: 1rem;
    color: #bcdcff;
    margin: 0 0 20px 0;
    text-align: center;
}

.consistency-instruction strong {
    color: #00ffff;
}

.consistency-running {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.consistency-running--hidden {
    display: none !important;
}

.consistency-live {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: #00ffff;
    margin: 0;
}

.consistency-results {
    text-align: center;
}

.consistency-results--hidden {
    display: none !important;
}

.consistency-results-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00ffff;
    margin: 0 0 16px 0;
}

.consistency-results-line {
    font-size: 1.1rem;
    color: #bcdcff;
    margin: 0 0 8px 0;
}

.consistency-results-line strong {
    color: #00ffff;
}

.consistency-results .aimtrainer-btn {
    margin-top: 20px;
}

/* CPS test */
.cps-duration-wrap {
    margin: 0;
}

.cps-zone {
    min-height: min(50vh, 320px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: linear-gradient(135deg, rgba(13, 13, 13, 0.95) 0%, rgba(8, 8, 18, 0.95) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px;
    outline: none;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 50px rgba(0, 255, 255, 0.05);
}

.cps-instruction {
    font-size: 1rem;
    color: #bcdcff;
    margin: 0 0 20px 0;
    text-align: center;
}

.cps-running {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.cps-running--hidden {
    display: none !important;
}

.cps-live {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: #00ffff;
    margin: 0;
}

.cps-click-hint {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
}

.cps-click-area {
    min-width: 200px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 200, 255, 0.15) 100%);
    border: 3px solid rgba(0, 255, 255, 0.5);
    border-radius: 16px;
    color: #00ffff;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
}

.cps-click-area:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.25) 0%, rgba(0, 200, 255, 0.25) 100%);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.5);
    transform: scale(1.02);
}

.cps-click-area:active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.35) 0%, rgba(0, 200, 255, 0.35) 100%);
    box-shadow: 0 0 45px rgba(0, 255, 255, 0.7);
}

.cps-results {
    text-align: center;
}

.cps-results--hidden {
    display: none !important;
}

.cps-results-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00ffff;
    margin: 0 0 16px 0;
}

.cps-results-line {
    font-size: 1.1rem;
    color: #bcdcff;
    margin: 0 0 8px 0;
}

.cps-results-line strong {
    color: #00ffff;
}

.cps-results .aimtrainer-btn {
    margin-top: 20px;
}

/* Aim screen: ensure it fits in the hub */
#aim-screen .aimtrainer-container {
    max-width: 100%;
}

#aim-screen .aimtrainer-arena {
    max-width: min(92vw, 900px);
}

/* --- Aim Trainer (integrated) --- */

.aimtrainer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.aimtrainer-hud {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 30, 0.95) 100%);
    padding: 20px 28px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.aimtrainer-hud .hud-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.aim-follow-stats--hidden {
    display: none !important;
}

.aimtrainer-hud .hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.aimtrainer-hud .hud-label {
    font-size: 12px;
    color: #bcdcff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.custom-select-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.custom-select-wrap .hud-option-label {
    font-size: 12px;
    color: #bcdcff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.custom-select {
    position: relative;
    min-width: 140px;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(51, 51, 51, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    color: #00ffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.custom-select-trigger:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.2) 100%);
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-1px);
}

.custom-select.open .custom-select-trigger {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
    border-color: #00ffff;
}

.custom-select-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-arrow {
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #00ffff;
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    padding: 6px 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(20, 20, 30, 0.98) 100%);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 255, 255, 0.2);
    z-index: 100;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.custom-select.open .custom-select-panel {
    display: block;
}

.custom-select-option {
    padding: 10px 14px;
    color: #bcdcff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 6px;
    margin: 0 4px;
}

.custom-select-option:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.2) 100%);
    color: #00ffff;
}

.custom-select-option--selected,
.custom-select-option.custom-select-option--selected {
    color: #00ffff;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.2) 100%);
}

.custom-select-option:focus {
    outline: none;
    background: rgba(0, 255, 255, 0.2);
}

.aimtrainer-btn {
    background: linear-gradient(135deg, rgba(51, 51, 51, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
    color: #ffffff;
    border: 2px solid rgba(0, 255, 255, 0.4);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 10px;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.aimtrainer-btn:hover {
    color: #00ffff;
    border-color: #00ffff;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 200, 255, 0.2) 100%);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.02);
}

.aimtrainer-btn-primary {
    margin-left: 8px;
    background: linear-gradient(135deg, #00ffff 0%, #00aaff 100%);
    color: #000;
    border-color: #00ffff;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.4);
}

.aimtrainer-btn-primary:hover {
    background: linear-gradient(135deg, #00ddff 0%, #00bbff 100%);
    color: #000;
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.7);
}

.aimtrainer-arena {
    position: relative;
    width: min(92vw, 900px);
    height: min(65vh, 520px);
    background: linear-gradient(135deg, rgba(13, 13, 13, 0.95) 0%, rgba(8, 8, 18, 0.95) 100%);
    border: 3px solid rgba(0, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 255, 255, 0.2),
        inset 0 0 60px rgba(0, 255, 255, 0.05);
    overflow: hidden;
    cursor: crosshair;
    outline: none;
    backdrop-filter: blur(10px);
}

.aimtrainer-arena:focus {
    border-color: #00ffff;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(0, 255, 255, 0.5),
        inset 0 0 60px rgba(0, 255, 255, 0.08);
}

.aimtrainer-target {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(0, 255, 255, 0.95), rgba(0, 200, 220, 0.8));
    border: 3px solid #00ffff;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.8),
        inset 0 0 15px rgba(255, 255, 255, 0.3);
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: box-shadow 0.1s ease;
}

.aimtrainer-target:hover {
    box-shadow:
        0 0 28px rgba(0, 255, 255, 1),
        inset 0 0 20px rgba(255, 255, 255, 0.4);
}

.aimtrainer-target.hit {
    animation: targetHit 0.15s ease-out forwards;
}

@keyframes targetHit {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.aimtrainer-target.size-small { min-width: 24px; min-height: 24px; }
.aimtrainer-target.size-medium { min-width: 40px; min-height: 40px; }
.aimtrainer-target.size-large { min-width: 56px; min-height: 56px; }

.aimtrainer-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.88) 0%, rgba(10, 10, 20, 0.88) 100%);
    color: #00ffff;
    font-family: 'Inter', sans-serif;
    text-align: center;
    padding: 28px;
    pointer-events: none;
    backdrop-filter: blur(8px);
    border-radius: 20px;
}

.aimtrainer-overlay button {
    pointer-events: auto;
    margin-top: 20px;
}

.aimtrainer-overlay--hidden {
    display: none;
}

.aimtrainer-overlay-text {
    font-size: 18px;
    color: #bcdcff;
    margin: 0;
    line-height: 1.6;
}

.aimtrainer-overlay-text strong {
    color: #00ffff;
}

.aimtrainer-overlay-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.aimtrainer-overlay-stats {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: #bcdcff;
    margin: 0;
    line-height: 1.8;
}

.aimtrainer-controls {
    color: #bcdcff;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    opacity: 0.9;
}

/* Responsive - DSA style */
@media (max-width: 768px) {
    .level-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .level-btn {
        padding: 20px;
    }

    .benchmark-test-hud {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
    }

    .reaction-zone {
        min-height: min(55vh, 350px);
    }

    .number-zone,
    .cps-zone,
    .pitch-zone,
    .consistency-zone {
        padding: 20px;
    }

    #aim-screen .aimtrainer-arena {
        height: min(60vh, 450px);
    }
}
