@tailwind base;
@tailwind components;
@tailwind utilities;

/* === V2 Custom Utilities === */
@layer utilities {
    .text-glow {
        text-shadow: 0 0 20px rgba(222, 155, 53, 0.4);
    }
    .bg-glass {
        background: rgba(13, 14, 18, 0.7);
        backdrop-filter: blur(12px);
    }
    .font-hud {
        font-family: 'Teko', sans-serif;
    }
}

/* === Global Atmosphere (Scanlines & Vignette) === */
.scanlines {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.1)
    );
    background-size: 100% 4px;
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0.6;
}

.vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, transparent 60%, rgba(0,0,0,0.8) 100%);
    z-index: 80;
    pointer-events: none;
}

/* === Animations === */
@keyframes slide-up {
    0% { transform: translateY(100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.animate-slide-up {
    animation: slide-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

.animate-pulse-ring::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid #DE9B35;
    animation: pulse-ring 2s infinite;
}

@keyframes glitch-text {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

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

.floating-weapon {
    animation: float 6s ease-in-out infinite;
    transform-origin: center center;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hover-glitch:hover {
    animation: glitch-text 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: #DE9B35;
}

/* Selection */
::selection {
    background: #DE9B35;
    color: #000;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #DE9B35; }
::-webkit-scrollbar-track { background: #000; }

/* Custom Button Shape */
.clip-path-button {
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

/* CS2 Specific HUD Shape */
.clip-path-hud {
    clip-path: polygon(
        10px 0,       /* Top Left Cut Start */
        100% 0,       /* Top Right */
        100% 100%,    /* Bottom Right */
        20px 100%,    /* Bottom Left Cut Start */
        0 calc(100% - 20px), /* Bottom Left Angled */
        0 10px        /* Top Left Angled */
    );
}

.font-display {
    text-transform: uppercase;
}

/* === Crosshair Cursor System === */
body {
    cursor: none; 
}

.crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.1s, height 0.1s, transform 0.1s;
}

/* Crosshair Lines */
.crosshair::before, .crosshair::after {
    content: '';
    position: absolute;
    background: #00ff00; /* Classic Green Crosshair */
    box-shadow: 0 0 4px rgba(0, 255, 0, 0.8);
    transition: all 0.1s;
}

/* Horizontal Line */
.crosshair::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

/* Vertical Line */
.crosshair::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

/* Gap (Center) */
.crosshair-gap::before, .crosshair-gap::after {
    /* To create a gap, we can clip the center or us separate elements. 
       Simpler approach: Just expand the wrapper on shoot/move */
}

/* Interactive States */
.crosshair.hovered {
    width: 32px;
    height: 32px;
    /* Turn Red or Gold on targets */
}
.crosshair.hovered::before, .crosshair.hovered::after {
    background: #DE9B35; /* Gold */
    box-shadow: 0 0 6px rgba(222, 155, 53, 0.8);
}

.crosshair.shooting {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.8;
}

/* New Scoreboard/HUD Styles */
.scoreboard-row {
    background: rgba(20, 20, 25, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}
.scoreboard-row:hover {
    background: rgba(30, 30, 40, 0.95);
    border-left: 4px solid #DE9B35;
}

/* === Cyber Reactor Style === */
.reactor-logo-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Reactor Ring */
.reactor-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(228, 160, 52, 0.2);
    box-shadow: 0 0 15px rgba(228, 160, 52, 0.1);
}

.reactor-ring::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #DE9B35;
    border-bottom-color: #DE9B35;
    animation: spin 8s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.reactor-ring::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    animation: spin-reverse 12s linear infinite;
}
@keyframes spin-reverse { 100% { transform: rotate(-360deg); } }

/* Reactor Core Glow */
.reactor-core {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(228, 160, 52, 0.15) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(228, 160, 52, 0.2);
    animation: pulse-reactor 2s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulse-reactor {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Tech Decorators */
.reactor-pip {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #DE9B35;
    border-radius: 50%;
    z-index: 20;
    box-shadow: 0 0 5px #DE9B35;
}

.pip-t { top: -3px; left: 50%; transform: translateX(-50%); }
.pip-b { bottom: -3px; left: 50%; transform: translateX(-50%); }
.pip-l { left: -3px; top: 50%; transform: translateY(-50%); }
.pip-r { right: -3px; top: 50%; transform: translateY(-50%); }
