﻿/* ==========================================================================
   Design System & Variables
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-base: #020617;
    /* Very dark slate */
    --bg-surface: rgba(30, 41, 59, 0.4);
    /* Glass surface */
    --bg-surface-hover: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Brand & Accents */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-emerald: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f97316;
    --accent-teal: #14b8a6;
    --accent-yellow: #eab308;
    --accent-indigo: #6366f1;

    /* Typography */
    --font-primary: 'Poppins', sans-serif;

    /* Effects */
    --glass-blur: 16px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
    --transition-fast: 0.2s ease;
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ambient Background Shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    animation: float 20s infinite ease-in-out alternate;
}

.bg-shape-1 {
    top: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
}

.bg-shape-2 {
    top: 40%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-blue), transparent 70%);
    animation-delay: -5s;
}

.bg-shape-3 {
    bottom: -10%;
    left: 20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-emerald), transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 50px) scale(1.1);
    }

    100% {
        transform: translate(-30px, -20px) scale(0.9);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

main.main-content {
    flex: 1;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Icon Colors */
.icon-blue {
    color: var(--accent-blue);
}

.icon-red {
    color: var(--accent-red);
}

.icon-pink {
    color: var(--accent-pink);
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Navigation (Glassmorphism Header)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 100;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    height: 70px;
    background: rgba(2, 6, 23, 0.85);
    box-shadow: var(--shadow-md);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
}

.logo img {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-icon {
    display: none;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    transition: width var(--transition-fast);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: #0f172a;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Hero Section & Search
   ========================================================================== */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 100px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
    display: flex;
    align-items: center;
    padding: 8px 16px;
}

.search-container:focus-within {
    background: rgba(30, 41, 59, 0.6);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: scale(1.02);
}

.search-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-left: 12px;
}

.search-container input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
}

.search-container input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 10px;
    font-size: 1.1rem;
    transition: color var(--transition-fast);
}

.search-clear:hover {
    color: var(--text-primary);
}

/* ==========================================================================
    /* Space for navbar */
    margin-bottom: 0;
    min-height: 120px;
}

.middle-ad,
.bottom-ad {
    margin: 64px 0;
}

/* ==========================================================================
   Tool Categories & Cards
   ========================================================================== */
.category-section {
    margin-bottom: 64px;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.05), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.tool-card:hover {
    transform: translateY(-8px);
    background: var(--bg-surface-hover);
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

.tool-info {
    position: relative;
    z-index: 2;
}

.tool-info h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.tool-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Gradients for Icons */
.gradient-blue {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.gradient-purple {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

.gradient-emerald {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.gradient-red {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.gradient-orange {
    background: linear-gradient(135deg, #fb923c, #f97316);
}

.gradient-teal {
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
}

.gradient-pink {
    background: linear-gradient(135deg, #f472b6, #ec4899);
}

.gradient-yellow {
    background: linear-gradient(135deg, #facc15, #eab308);
}

.gradient-indigo {
    background: linear-gradient(135deg, #818cf8, #6366f1);
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    color: var(--border-highlight);
    margin-bottom: 16px;
}

.no-results h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(2, 6, 23, 0.4);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding-top: 64px;
    margin-top: 64px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin: 20px 0;
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-bounce);
}

.social-links a:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-4px);
    border-color: var(--accent-blue);
}

.footer-links-group h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.footer-links-group ul {
    list-style: none;
}

.footer-links-group ul li {
    margin-bottom: 12px;
}

.footer-links-group ul li a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links-group ul li a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 140px 0 60px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: span 1;
    }
}

/* Base formatting for basic pages (Terms, Privacy, etc) */
.page-header {
    margin-top: 100px;
    padding: 60px 0 40px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.content-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 48px;
    margin-bottom: 64px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.content-section h2 {
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.content-section h2:first-child {
    margin-top: 0;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.content-section ul {
    margin-left: 20px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.content-section li {
    margin-bottom: 8px;
}

/* Tool badge — shown on featured/new tool cards */
.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    background: rgba(249, 115, 22, 0.12);
    color: var(--accent-orange);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s;
}

.tool-card:hover .tool-badge {
    background: rgba(249, 115, 22, 0.22);
}

/* AdSense Containers - hide placeholder visual but keep space for real ads */
.adsense-placeholder {
    display: none !important;
}

.adsense-container {
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}