:root {
    --valorant-red: #ff4655;
    --valorant-dark: #0f1923;
}

body {
    margin: 0;
    user-select: none;
}

/* Crosshair Design */
:root {
    --ch-color: #00ff00;
    --ch-size: 8px;
    --ch-thickness: 2px;
    --ch-gap: 4px;
    --ch-dot-size: 2px;
}

.crosshair {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ch-part {
    position: absolute;
    background: var(--ch-color);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.ch-dot {
    width: var(--ch-dot-size);
    height: var(--ch-dot-size);
    background: var(--ch-color);
    border-radius: 50%;
}

.ch-top, .ch-bottom {
    width: var(--ch-thickness);
    height: var(--ch-size);
}

.ch-left, .ch-right {
    width: var(--ch-size);
    height: var(--ch-thickness);
}

.ch-top { transform: translateY(calc(-1 * (var(--ch-gap) + var(--ch-size) / 2))); }
.ch-bottom { transform: translateY(calc(var(--ch-gap) + var(--ch-size) / 2)); }
.ch-left { transform: translateX(calc(-1 * (var(--ch-gap) + var(--ch-size) / 2))); }
.ch-right { transform: translateX(calc(var(--ch-gap) + var(--ch-size) / 2)); }

/* Animations */
@keyframes recoil {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.crosshair-fire {
    animation: recoil 0.1s ease-out;
}

/* Target hit effect */
.hit-flash {
    position: fixed;
    inset: 0;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.1s;
}

.hit-flash.active {
    opacity: 0.1;
}

/* Color Chips */
.color-chip.active {
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px currentColor;
}

/* Countdown Animation */
@keyframes countdown-pulse {
    0% { transform: scale(3); opacity: 0; }
    20% { transform: scale(1); opacity: 1; }
    80% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.5); opacity: 0; }
}

.countdown-animate {
    animation: countdown-pulse 1s ease-in-out infinite;
}

/* Leaderboard Rows */
tr.top-agent {
    background: linear-gradient(90deg, rgba(255, 70, 85, 0.1) 0%, transparent 100%);
}

.trophy-gold { color: #ffd700; text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
.trophy-silver { color: #c0c0c0; text-shadow: 0 0 20px rgba(192, 192, 192, 0.5); }
.trophy-bronze { color: #cd7f32; text-shadow: 0 0 20px rgba(205, 127, 50, 0.5); }

/* Custom Scrollbar */
#leaderboard-modal .overflow-y-auto::-webkit-scrollbar,
#lobby-screen::-webkit-scrollbar {
    width: 6px;
}
#leaderboard-modal .overflow-y-auto::-webkit-scrollbar-track,
#lobby-screen::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
#leaderboard-modal .overflow-y-auto::-webkit-scrollbar-thumb,
#lobby-screen::-webkit-scrollbar-thumb {
    background: #ff4655;
    border-radius: 10px;
}

/* Animations */
@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(11000%); }
}

@keyframes background-pulse {
    0% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(1.1); }
    100% { opacity: 0.1; transform: scale(1); }
}

.animate-slide-in-left { animation: slide-in-left 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-slide-in-right { animation: slide-in-right 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-fade-in { animation: fade-in 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-scan { animation: scan 3s linear infinite; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border-bottom-color: #ff4655 !important;
}

/* Enhanced Table Styles */
#lobby-leaderboard-body tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

#lobby-leaderboard-body tr:hover {
    background: rgba(255, 70, 85, 0.05);
    transform: scale(1.01);
}

/* Mobile Disclaimer Handling */
@media (min-width: 1025px) {
    #mobile-lock {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    #lobby-screen, #ui-overlay, #countdown-overlay, #summary-screen, #canvas-container {
        display: none !important;
    }
    body {
        overflow: hidden !important;
    }
}

/* Premium Background Glows */
#lobby-screen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 70, 85, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: background-pulse 10s ease-in-out infinite;
}
