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

:root {
    --neon-green: #39ff14;
    --neon-cyan: #22d3ee;
    --dark-bg: #050a0e;
}

body {
    background-color: var(--dark-bg);
}
/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-green);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s;
    mix-blend-mode: difference;
}

.custom-cursor.active {
    width: 50px;
    height: 50px;
    border-color: var(--neon-cyan);
    background-color: rgba(34, 211, 238, 0.1);
    backdrop-filter: blur(2px);
}

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

/* Holographic Hover Effect */
.holo-hover {
    position: relative;
    overflow: hidden;
}

.holo-hover::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(57, 255, 20, 0.1) 0%, transparent 70%);
    transform: translate(-100%, -100%);
    transition: transform 0.5s ease-out;
    pointer-events: none;
}

.holo-hover:hover::after {
    transform: translate(0, 0);
}

/* Skew on Hover */
.skew-hover {
    transition: transform 0.3s ease;
}

.skew-hover:hover {
    transform: skewX(-10deg) translateX(10px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a1518;
}

::-webkit-scrollbar-thumb {
    background: #1a2f23;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #39ff14;
}

/* Utility for Perspective */
.perspective-1000 {
    perspective: 1000px;
}

/* Tilt Card 3D Effect classes are handled in JS, 
   but we add base transition here */
.tilt-card {
    transform-style: preserve-3d;
    transform: translateZ(0);
}

/* Holographic Scanline Overlay */
.scanlines::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    z-index: 20;
    pointer-events: none;
}

/* Text Glitch Effect */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    5% { clip: rect(85px, 9999px, 60px, 0); }
    10% { clip: rect(10px, 9999px, 90px, 0); }
    15% { clip: rect(50px, 9999px, 20px, 0); }
    20% { clip: rect(100px, 9999px, 80px, 0); }
    100% { clip: rect(0, 9999px, 0, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(60px, 9999px, 20px, 0); }
    5% { clip: rect(10px, 9999px, 50px, 0); }
    10% { clip: rect(90px, 9999px, 10px, 0); }
    15% { clip: rect(20px, 9999px, 80px, 0); }
    20% { clip: rect(80px, 9999px, 20px, 0); }
    100% { clip: rect(0, 9999px, 0, 0); }
}

/* Button Electric Hover */
.electric-btn {
    position: relative;
    overflow: hidden;
    transition: 0.2s;
}

.electric-btn:hover {
    background: #39ff14;
    color: black;
    box-shadow: 0 0 10px #39ff14, 0 0 40px #39ff14;
}

.electric-btn:active {
    box-shadow: 0 0 10px #39ff14, 0 0 80px #39ff14;
    transform: scale(0.95);
}

/* Holographic Card Border Animation */
.holo-border {
    position: relative;
}

.holo-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #39ff14, transparent);
    transform: translateX(-100%);
    animation: holo-slide 3s infinite linear;
}

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

/* Floating Animation Adjustment */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Typing Cursor */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Reveal Text Animation */
.reveal-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.active {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
}
