/* ==========================================================================
   1. BRAC BRAND VARIABLES
   ========================================================================== */
:root {
    --bg-dark: #020617;          
    --card-bg: rgba(30, 41, 59, 0.6); 
    --neon-indigo: #6366f1;
    --neon-pink: #ec4899;
    --neon-cyan: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   2. THE TOOLS WRAPPER
   ========================================================================== */
.tools-portal-wrapper {
    position: relative;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    min-height: 100vh;
}

/* ==========================================================================
   3. BACKGROUND ANIMATION: VISIBLE AURORA CLOUDS
   ========================================================================== */
.cortex-bg {
    position: absolute;
    top: 0; left: 0; width: 60vw; height: 60vw;
    border-radius: 50%;
    /* Brightened the Indigo cloud so it is clearly visible */
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 60%);
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    animation: drift-1 20s ease-in-out infinite alternate;
}

.ambient-glow {
    position: absolute;
    bottom: 10%; right: 0;
    width: 60vw; height: 60vw;
    border-radius: 50%;
    /* Brightened the Pink cloud so it is clearly visible */
    background: radial-gradient(circle, rgba(236, 72, 153, 0.20) 0%, transparent 60%);
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    animation: drift-2 25s ease-in-out infinite alternate;
}

@keyframes drift-1 {
    0% { transform: translate(-10%, -10%) scale(1); }
    100% { transform: translate(20%, 20%) scale(1.2); }
}

@keyframes drift-2 {
    0% { transform: translate(10%, 10%) scale(1); }
    100% { transform: translate(-20%, -20%) scale(1.2); }
}

/* ==========================================================================
   4. HERO SECTION & TYPOGRAPHY
   ========================================================================== */
.hero-section {
    /* Huge top padding pushes it safely below your main fixed header */
    padding: 160px 0 20px 0; 
}

.badge-cyber {
    display: inline-block;
    border: 1px solid rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    padding: 8px 20px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    margin-bottom: 30px;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.8; box-shadow: 0 0 10px rgba(99, 102, 241, 0.2); }
    50% { opacity: 1; box-shadow: 0 0 25px rgba(99, 102, 241, 0.6); }
}
.animate-pulse { animation: pulseGlow 2s infinite; }

.main-title {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.text-gradient-neon {
    background: linear-gradient(to right, #818cf8, #e879f9, #22d3ee);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textFlow 3s linear infinite;
    display: inline-block; 
    padding-right: 15px; /* Safely prevents 'B' from cutting off */
}

@keyframes textFlow { to { background-position: 200% center; } }

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    /* Pushes the subtitle far away from the search bar */
    margin: 0 auto 50px auto; 
}

/* ==========================================================================
   5. THE SEARCH BEAM
   ========================================================================== */
.search-beam-container {
    position: relative;
    max-width: 650px;
    margin: 0 auto;
    /* Extra spacing below the search bar */
    margin-bottom: 40px; 
}

.search-beam-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(99, 102, 241, 0.4);
    border-radius: 9999px;
    padding: 20px 24px 20px 60px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    outline: none;
}

.search-beam-input:focus {
    border-color: var(--neon-pink);
    box-shadow: 0 0 40px rgba(236, 72, 153, 0.4);
    transform: scale(1.02);
    background: rgba(15, 23, 42, 0.95);
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-indigo);
    font-size: 1.4rem;
}

/* ==========================================================================
   6. CATEGORY FILTERS
   ========================================================================== */
.filter-nav {
    text-align: center;
    padding-top: 20px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.filter-btn {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--neon-indigo);
    color: #fff;
    border-color: var(--neon-indigo);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-3px);
}

/* ==========================================================================
   7. CYBER DATA SHARDS (TOOL CARDS)
   ========================================================================== */
.shard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding-bottom: 20px;
}

.data-shard {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--neon-cyan);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(16px);
    min-height: 180px;
}

.data-shard:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-8px) scale(1.02);
    border-color: var(--neon-pink);
    border-left-color: var(--neon-pink);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.6), 0 0 25px rgba(236, 72, 153, 0.25);
}

.shard-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--neon-cyan);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-shard:hover .shard-meta { color: var(--neon-pink); }

.shard-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.shard-status {
    margin-top: 24px;
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Courier New', monospace;
}

.data-shard:hover .shard-status { color: var(--text-muted); }

/* Error Message */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.no-results i { font-size: 3.5rem; color: #475569; margin-bottom: 20px; }
.no-results h3 { font-family: 'Courier New', monospace; font-size: 1.6rem; margin-bottom: 10px; }

/* ==========================================================================
   8. CYBER FOOTER FOR TOOLS
   ========================================================================== */
.cyber-footer {
    border-top: 1px solid var(--border-light);
    background: rgba(2, 6, 23, 0.8); 
    padding: 50px 0;
    margin-top: 60px;
}

.privacy-notice {
    color: var(--neon-cyan);
    font-size: 0.95rem;
    margin-bottom: 16px;
    background: rgba(6, 182, 212, 0.15);
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.footer-link { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.footer-link:hover { color: var(--neon-pink); }

/* ==========================================================================
   9. MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
    .main-title { font-size: 2.5rem; }
    .hero-section { padding: 120px 0 30px 0; }
    
    /* ADDED PADDING HERE: Gives the cards breathing room on the left and right */
    .shard-grid { 
        grid-template-columns: 1fr; 
        padding-left: 15px; 
        padding-right: 15px; 
    }
    
    .cortex-bg, .ambient-glow { width: 120vw; height: 120vw; }
}