/* BYPASSER 2.0 | TUFF MONOCHROME EDITION */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* --- 1. GLOBAL & BODY (Enhanced Depth) --- */
body {
    /* FIXED: Changed to transparent to allow Matrix Canvas to show through */
    background: transparent; 
    background-color: #000;
    background-attachment: fixed;
    overflow-x: hidden;
    color: #fff;
    margin: 0;
    padding: 0;
    font-family: 'Orbitron', sans-serif;
    /* Smooth entrance */
    animation: bootUp 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes bootUp {
    0% { opacity: 0; transform: scale(1.05); filter: blur(10px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* --- TUFF BACKGROUND ANIMATION --- */
/* FIXED: z-index set to -2 to stay behind the Matrix Canvas */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black, transparent 90%);
    z-index: -2;
    animation: meshPulse 8s ease-in-out infinite alternate;
}

@keyframes meshPulse {
    from { opacity: 0.3; transform: translateY(0) scale(1); }
    to { opacity: 0.7; transform: translateY(-20px) scale(1.05); }
}

/* --- FLOATING GEOMETRIC SHAPES (New) --- */
/* FIXED: z-index set to -2 to ensure visibility of foreground elements */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 0%, transparent 10%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 10%);
    z-index: -2;
    animation: floatShapes 15s linear infinite;
}

@keyframes floatShapes {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- CRT & SCANLINE OVERLAYS --- */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        180deg,
        rgba(255,255,255,0.01),
        rgba(255,255,255,0.01) 1px,
        transparent 2px,
        transparent 4px
    );
    z-index: 999;
}

/* --- 2. NAVIGATION ENHANCEMENT --- */
nav.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid #fff;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.8);
}

.logo {
    text-shadow: 0 0 15px #fff;
    letter-spacing: 2px;
    transition: 0.3s;
}

.logo:hover {
    letter-spacing: 5px;
    filter: drop-shadow(0 0 20px #fff);
}

/* --- 3. HERO SECTION & SCROLL EFFECTS --- */
#hero {
    background: transparent !important; /* Ensure background shows through hero box */
}

#hero h1 {
    font-size: 6rem;
    letter-spacing: 15px;
    background: linear-gradient(180deg, #fff 30%, #333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.2));
}

#hero p {
    color: #888;
    letter-spacing: 8px;
    transition: 0.5s;
}

/* --- 4. TUFF TOOL CARDS --- */
.tools {
    perspective: 1500px;
    background: transparent !important; /* Forces container transparency to see grid */
}

.card {
    background: rgba(10, 10, 10, 0.4); /* Reduced opacity for better grid visibility */
    backdrop-filter: blur(8px);
    border: 1px solid #222;
    border-radius: 12px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(-2deg);
    border-color: #fff;
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.15);
    z-index: 100;
}

/* FIXED: Images stay colorful and are not grayscale by default */
.card img {
    filter: grayscale(0%) brightness(1); 
    transition: 0.8s ease;
}

.card:hover img {
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transform: scale(1.05);
}

.card-content h3 {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* --- 5. BUTTONS & DOWNLOADS --- */
button, .download {
    background: #000;
    border: 1px solid #444;
    color: #fff;
    text-transform: uppercase;
    overflow: hidden;
    position: relative;
    transition: 0.4s;
}

button::before, .download::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

button:hover::before, .download:hover::before {
    left: 100%;
}

button:hover, .download:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 25px #fff;
    transform: scale(1.02);
}

/* --- 6. MODALS --- */
.modal-box {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid #fff;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
    animation: modalSlide 0.4s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- 7. SCROLLBAR (Minimalist White) --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
    transition: 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
    box-shadow: 0 0 10px #fff;
}

/* --- LOAD ANIMATION FOR TOOLS --- */
.card {
    opacity: 0;
    animation: cardFadeIn 0.6s forwards;
}

@keyframes cardFadeIn {
    to { opacity: 1; }
}

/* Staggered delay for cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

footer {
    border-top: 1px solid #111;
    margin-top: 50px;
    background: rgba(0, 0, 0, 0.8);
    color: #444;
    transition: 0.3s;
}

footer:hover {
    color: #fff;
    text-shadow: 0 0 10px #fff;
}