/* --- KEYFRAMES MODERN --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes gradientText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

html {
    scroll-padding-top: 100px;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

:root {
    /* MODERN LIGHT THEME PALETTE */
    --bg-body: #ffffff;
    --bg-soft: #f8fafc;
    --bg-card: #ffffff;
    
    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --accent: #8b5cf6;
    
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 100px;
    --transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    
    /* --- RESTORED SAAS STYLE GRID BACKGROUND --- */
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.05) 0px, transparent 50%),
        linear-gradient(to right, rgba(226, 232, 240, 0.3) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(226, 232, 240, 0.3) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* --- MODERN GLASS NAVBAR --- */
header {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    transition: var(--transition);
}

.navbar {
    width: 100%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-pill);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

/* Scrolled state for Navbar */
header.scrolled .navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
    padding: 10px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    color: var(--text-main);
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.logo:hover { transform: scale(1.05); }

.logo i {
    color: var(--primary);
    font-size: 22px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

/* Underline Animation */
.nav-links a:not(.btn-dev-channel)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:not(.btn-dev-channel):hover::after {
    width: 100%;
}

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

.btn-dev-channel {
    background: #f0fdf4;
    color: #16a34a;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dcfce7;
    transition: var(--transition);
    text-decoration: none !important;
}

.btn-dev-channel:hover {
    background: #16a34a;
    color: white;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
    transform: translateY(-2px);
}

.mobile-menu {
    display: none;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

/* --- HERO SECTION --- */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    position: relative;
}

/* Scroll Reveal Base Class */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.badge-new:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.badge-new i { 
    color: #eab308;
    animation: spin 3s linear infinite; 
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
    color: var(--text-main);
    /* Gradient Text Animation */
    background: linear-gradient(-45deg, var(--text-main), #4f46e5, #8b5cf6, var(--text-main));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 6s ease infinite;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cta-button {
    background: var(--text-main);
    color: white;
    padding: 16px 36px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    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;
}

.cta-button:hover::after {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.3);
}

.cta-outline {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(4px);
    color: var(--text-main);
    padding: 16px 36px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.cta-outline:hover {
    border-color: var(--text-main);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* --- TOOLS SECTION --- */
.section-title {
    text-align: center;
    margin: 80px 0 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -1px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    background: var(--bg-soft);
    padding: 6px;
    border-radius: var(--radius-pill);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--border);
    position: relative;
    z-index: 5;
}

.category-tab {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.category-tab:hover {
    color: var(--text-main);
    background: rgba(0,0,0,0.05);
}

.category-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    padding-bottom: 100px;
}

/* Ultra Modern Card Design */
.tool-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    opacity: 0; /* Default hidden for scroll reveal */
    transform: translateY(20px);
    overflow: hidden;
}

/* Gradient Border Hint on Hover */
.tool-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

.tool-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: var(--shadow-xl);
    background: white;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 24px;
}

.tool-icon {
    width: 56px;
    height: 56px;
    background: #eef2ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 24px;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.tool-card:hover .tool-icon {
    background: var(--primary);
    color: white;
    transform: rotate(-10deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.tool-category-badge {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-soft);
    padding: 6px 10px;
    border-radius: 8px;
    transition: 0.3s;
}

.tool-card:hover .tool-category-badge {
    background: var(--text-main);
    color: white;
}

.tool-content h3 {
    color: var(--text-main);
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.tool-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 28px;
    line-height: 1.6;
}

.tool-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    gap: 8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.tool-link::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0%; height: 100%;
    background: var(--bg-soft);
    transition: width 0.3s ease;
    z-index: -1;
}

.tool-link:hover::before {
    width: 100%;
}

.tool-link:hover {
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.tool-link i { font-size: 0.8em; transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.tool-link:hover i { transform: translateX(6px); }

/* --- FOOTER CLEAN --- */
footer {
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
    background: white;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--text-main);
    margin-bottom: 24px;
    font-size: 1rem;
    font-weight: 700;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 14px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(8px);
}

.developer-section {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .hero h1 { 
        font-size: 2.8rem; 
    }
    .hero p {
        font-size: 1rem;
    }
    .nav-links { display: none; }
    .mobile-menu { display: block; }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        padding: 30px;
        border-radius: 24px;
        box-shadow: var(--shadow-xl);
        border: 1px solid var(--border);
        z-index: 101;
        animation: fadeInUp 0.4s ease forwards;
    }
    
    .navbar { padding: 10px 20px; }
    .hero { padding-top: 140px; }
}
