/* Strict Minimalist Hacker Theme - Ultra Dark (Optimized) */

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --success: #10B981;
    --danger: #EF4444;
    --bg: #000000;
    --bg-secondary: #0A0A0A;
    --bg-card: #0A0A0A;
    --bg-elevated: #111111;
    --text: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --border: #222222;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 4px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global Fix: Hide MadelineProto/Warning elements that create top gap */
body > b:first-child, 
body > br:first-child,
body > b:nth-child(2) {
    display: none !important;
}

a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

a:hover { color: var(--text); }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: clamp(16px, 4vw, 20px);
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.logo { width: 28px; height: 28px; }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-menu a {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.nav-menu a:hover { color: var(--primary); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: #FFFFFF;
    transition: 0.3s;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 100px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.hero h1 {
    font-size: clamp(32px, 8vw, 72px);
    font-weight: 900;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: clamp(16px, 3vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Search UI */
.search-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.tab-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.search-form { display: none; }
.search-form.active { display: block; }

.input-group {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 4px;
}

.input-group:focus-within { border-color: var(--primary); }
.input-group input { flex: 1; background: transparent; border: none; padding: 16px 24px; font-size: 16px; color: var(--text); outline: none; }
.btn-primary { background: var(--primary); color: white; border: none; padding: 16px 32px; font-size: 15px; font-weight: 700; cursor: pointer; }

/* Global Grid Sections - Centered for PC */
.features, .how-it-works, .blog-preview {
    padding: 100px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.section-title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    margin-bottom: 60px;
    color: #FFF;
}

.features-grid, .steps, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card, .step {
    background: var(--bg-card);
    padding: 48px 32px;
    border: 1px solid var(--border);
    text-align: center;
    transition: 0.3s;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Ultra-Professional Hacker-Style Blog Cards */
.blog-card {
    background: linear-gradient(145deg, #111111 0%, #050505 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    height: 100%;
    padding: 0;
}

.blog-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-card:hover .blog-title {
    color: var(--primary);
}

.blog-image-wrapper {
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: 180px;
    width: 100%;
}

.blog-image {
    height: 100%;
    width: 100%;
    background-color: #0A0A0A;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s ease;
}

.blog-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #050505 0%, transparent 100%);
    opacity: 0.9;
    pointer-events: none;
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
    align-items: flex-start;
}

.blog-title {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    width: 100%;
}

.read-more {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.3s ease;
}

.blog-card:hover .read-more {
    gap: 8px;
}

.blog-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid rgba(37, 99, 235, 0.3);
    font-family: var(--font-mono);
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.feature-card:hover { border-color: var(--primary); }

.feature-icon, .step-number {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 24px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 24px;
    font-weight: 900;
}

/* Results Card */
.results-container { margin-top: 60px; max-width: 700px; margin-left: auto; margin-right: auto; display: none; }

.loading { 
    display: none; 
    padding: 40px; 
    text-align: center; 
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.result-card { background: var(--bg-card); padding: 40px; border: 1px solid var(--border); text-align: left; }
.result-card.result-danger { border: 1px solid var(--danger); font-family: var(--font-mono); }
.result-card.result-success { border-left: 6px solid var(--success); }

/* Footer */
.footer {
    background: var(--bg);
    padding: 80px 20px 40px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h3 {
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 32px;
    margin-top: 40px;
    text-align: center;
}

/* Mobile Bottom Bar - HIDDEN ON PC */
.mobile-bottom-bar {
    display: none; 
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .hero { padding: 60px 16px 40px !important; min-height: auto !important; }
    .navbar .container { padding: 12px 16px !important; }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #000;
        flex-direction: column;
        padding: 30px 16px;
        border-bottom: 1px solid var(--border);
        gap: 20px;
    }
    
    .nav-menu.active { display: flex; }
    .nav-toggle { display: flex; }
    
    .search-tabs { flex-direction: column; gap: 12px; }
    .tab-btn { width: 100%; flex-direction: row; }
    
    .input-group { flex-direction: column; background: transparent; border: none; gap: 16px; padding: 0; }
    .input-group input { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); width: 100%; padding: 14px; }
    .btn-primary { width: 100%; padding: 14px; }
    
    .features, .how-it-works, .blog-preview { padding: 60px 16px; }
    .features-grid, .steps, .blog-grid { grid-template-columns: 1fr; gap: 20px; }
    .feature-card, .step, .blog-card { padding: 32px 16px; }
    
    .footer { text-align: center; padding: 40px 16px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    
    /* VISIBLE ONLY ON MOBILE */
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #0A0A0A;
        border-top: 1px solid #222;
        padding: 12px 0;
        justify-content: space-around;
        z-index: 1000;
    }
    
    .bottom-nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: #FFFFFF; }
    .bottom-nav-item.active { color: var(--primary); }
    
    body { padding-bottom: 70px; } /* Space for bottom bar */
}
