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

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 3px;
}

/* Dynamic Light & Dark Grid Background */
.grid-bg {
    background-size: 36px 36px;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

.dark .grid-bg {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glow Pulse Dot for Available Status */
@keyframes neonGlowPulse {
    0%, 100% {
        box-shadow: 0 0 6px #10b981, 0 0 12px #10b981;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 2px #10b981, 0 0 4px #10b981;
        transform: scale(0.85);
    }
}
.glow-pulse-dot {
    animation: neonGlowPulse 1.8s infinite ease-in-out;
}

/* Scroll Mouse Dot Animation (Matching Image 1) */
@keyframes scrollDotAnim {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    80% {
        transform: translateY(12px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 0;
    }
}
.animate-scroll-dot {
    animation: scrollDotAnim 1.6s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

/* Mouse Glow Effect for Cards */
.glow-card {
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glow-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(16, 185, 129, 0.25), transparent 40%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-card:hover::before {
    opacity: 1;
}

/* Nav Links Underline */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #10b981;
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Custom Animations */
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-slow {
    animation: spinSlow 15s linear infinite;
}

@keyframes floatAnim {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -8px); }
}
.float-anim {
    animation: floatAnim 4s ease-in-out infinite;
}

.cursor-blink {
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Dynamic Mouse Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
}
.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(16, 185, 129, 0.6);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99998;
    transition: transform 0.15s ease-out;
}

/* Toast Message */
.toast {
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
