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

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

::-webkit-scrollbar-thumb {
    background: #1c1c2e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #22c55e;
}

/* Selection */
::selection {
    background: rgba(34, 197, 94, 0.3);
    color: white;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background: linear-gradient(270deg, #22c55e, #16a34a, #22c55e);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glass Effect */
.glass {
    background: rgba(19, 19, 31, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glow Effects */
.glow-mine {
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.15);
}

/* Grid Pattern Background */
.bg-grid {
    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);
    background-size: 50px 50px;
}

/* Loading Animation */
.loading-dots:after {
    content: '.';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* Hover Transitions */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Custom Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-4px);
}

/* Noise Texture */
.noise {
    position: relative;
}

.noise::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Responsive Typography */
@media (max-width: 768px) {
    .text-responsive-hero {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Interactive Console Styles */
#console-output::-webkit-scrollbar {
    width: 6px;
}

#console-output::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

#console-output::-webkit-scrollbar-thumb {
    background: rgba(34, 197, 94, 0.3);
    border-radius: 3px;
}

#console-input:focus {
    color: #22c55e;
}

#console-input::placeholder {
    transition: opacity 0.3s;
}

#console-input:focus::placeholder {
    opacity: 0.5;
}

/* 3D Card Effects */
.preserve-3d {
    transform-style: preserve-3d;
}

.perspective-1000 {
    perspective: 1000px;
}

/* Glowing border animation */
@keyframes border-glow {
    0%, 100% { border-color: rgba(34, 197, 94, 0.3); }
    50% { border-color: rgba(34, 197, 94, 0.6); }
}

.console-active {
    animation: border-glow 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.2);
}

/* Typing cursor effect */
.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
    color: #22c55e;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Network Canvas */
#network-canvas {
    background: linear-gradient(180deg, rgba(10,10,15,0) 0%, rgba(34,197,94,0.05) 50%, rgba(10,10,15,0) 100%);
}

/* Stats Counter Animation */
@keyframes count-up {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.stat-update {
    animation: count-up 0.3s ease-out;
    color: #22c55e;
}