/*
Theme Name: Nofyi - Global Online Tools Hub
Theme URI: https://nofyi.com
Author: Nofyi Team
Author URI: https://nofyi.com
Description: A fast, SEO-optimized, AdSense-ready WordPress theme with 80+ free online tools. Features liquid animations, Material Design, dark mode, and worldwide viral tools for Google/Bing ranking. Built for maximum traffic and AdSense approval.
Version: 7.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nofyi
Tags: tools, calculator, converter, seo-optimized, fast-loading, adsense-ready, responsive, mobile-friendly, dark-mode, liquid-animation
*/

/* ==========================================================================
   CSS Variables - Vibrant Material Design Palette
   ========================================================================== */
:root {
    /* Primary Gradient Palette */
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --primary-light: #8B85FF;
    --primary-glow: rgba(108, 99, 255, 0.3);

    /* Secondary Palette */
    --secondary: #FF6584;
    --secondary-dark: #E5506D;
    --secondary-light: #FF8FA3;

    /* Accent Colors */
    --accent-cyan: #00D2FF;
    --accent-green: #00E676;
    --accent-orange: #FF9100;
    --accent-pink: #F50057;
    --accent-yellow: #FFD600;

    /* Category Colors */
    --cat-text: #6C63FF;
    --cat-pdf: #FF6584;
    --cat-image: #00D2FF;
    --cat-dev: #00E676;
    --cat-calc: #FF9100;
    --cat-convert: #F50057;
    --cat-social: #FFD600;
    --cat-generator: #8B85FF;
    --cat-seo: #FF6B35;
    --cat-encode: #00BCD4;

    /* Backgrounds */
    --bg-primary: #0A0E27;
    --bg-secondary: #111535;
    --bg-card: #1A1F42;
    --bg-card-hover: #222854;
    --bg-glass: rgba(26, 31, 66, 0.7);
    --bg-input: rgba(255, 255, 255, 0.05);

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #A0A5C8;
    --text-muted: #6B7094;
    --text-accent: #6C63FF;

    /* Borders */
    --border: rgba(108, 99, 255, 0.15);
    --border-hover: rgba(108, 99, 255, 0.4);
    --border-active: rgba(108, 99, 255, 0.8);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
    --gradient-secondary: linear-gradient(135deg, #00D2FF 0%, #6C63FF 100%);
    --gradient-warm: linear-gradient(135deg, #FF6584 0%, #FFD600 100%);
    --gradient-cool: linear-gradient(135deg, #00D2FF 0%, #00E676 100%);
    --gradient-dark: linear-gradient(135deg, #0A0E27 0%, #1A1F42 100%);
    --gradient-card: linear-gradient(145deg, rgba(26, 31, 66, 0.8) 0%, rgba(17, 21, 53, 0.9) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(108, 99, 255, 0.1) 0%, rgba(255, 101, 132, 0.1) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(108, 99, 255, 0.3);
    --shadow-glow-pink: 0 0 30px rgba(255, 101, 132, 0.3);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Spacing */
    --container-width: 1280px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Mode Override (default is dark) */
[data-theme="light"] {
    --bg-primary: #F5F7FF;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F9FF;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --bg-input: rgba(0, 0, 0, 0.03);
    --text-primary: #0A0E27;
    --text-secondary: #5A5F82;
    --text-muted: #8B90B0;
    --border: rgba(108, 99, 255, 0.12);
    --border-hover: rgba(108, 99, 255, 0.3);
    --shadow-sm: 0 2px 8px rgba(108, 99, 255, 0.08);
    --shadow-md: 0 4px 16px rgba(108, 99, 255, 0.12);
    --shadow-lg: 0 8px 32px rgba(108, 99, 255, 0.15);
    --shadow-glow: 0 0 30px rgba(108, 99, 255, 0.1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.3s ease;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   Liquid Animation Background
   ========================================================================== */
.liquid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.liquid-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: liquidFloat 20s ease-in-out infinite;
}

.liquid-blob:nth-child(1) {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.liquid-blob:nth-child(2) {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    top: 50%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 20s;
}

.liquid-blob:nth-child(3) {
    width: 400px;
    height: 400px;
    background: var(--accent-cyan);
    bottom: -10%;
    left: 30%;
    animation-delay: -10s;
    animation-duration: 22s;
}

.liquid-blob:nth-child(4) {
    width: 350px;
    height: 350px;
    background: var(--accent-green);
    top: 30%;
    left: 50%;
    animation-delay: -7s;
    animation-duration: 18s;
    opacity: 0.2;
}

[data-theme="light"] .liquid-blob {
    opacity: 0.15;
    filter: blur(100px);
}

@keyframes liquidFloat {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(50px, -80px) scale(1.1) rotate(90deg); }
    50% { transform: translate(-30px, 60px) scale(0.9) rotate(180deg); }
    75% { transform: translate(80px, 30px) scale(1.05) rotate(270deg); }
}

/* ==========================================================================
   Header - Glassmorphism with Liquid Effect
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.site-header.scrolled {
    background: rgba(10, 14, 39, 0.95);
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform var(--transition-normal);
}
.site-logo:hover { transform: scale(1.03); }

.site-logo svg { height: 40px; width: auto; }

.site-navigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-navigation ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.site-navigation li a {
    display: block;
    padding: 0.5rem 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.site-navigation li a:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

/* Submenu */
.site-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 999;
}
.site-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.site-navigation .sub-menu li a {
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
}

/* Header Buttons */
.search-toggle, .dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.search-toggle:hover, .dark-mode-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.1);
}

.dark-mode-toggle .moon-icon { display: none; }
[data-theme="dark"] .dark-mode-toggle .sun-icon { display: none; }
[data-theme="dark"] .dark-mode-toggle .moon-icon { display: block; }
[data-theme="light"] .dark-mode-toggle .sun-icon { display: none; }
[data-theme="light"] .dark-mode-toggle .moon-icon { display: none; }
[data-theme="light"] .dark-mode-toggle .sun-icon { display: block; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .site-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        transition: right var(--transition-smooth);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    .site-navigation.mobile-menu-active { right: 0; }
    .site-navigation ul {
        flex-direction: column;
        width: 100%;
    }
    .site-navigation li a {
        padding: 0.75rem 1rem;
        width: 100%;
    }
}

/* ==========================================================================
   Search Modal
   ========================================================================== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}
.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 90%;
    max-width: 640px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transform: translateY(-20px) scale(0.95);
    transition: transform var(--transition-smooth);
}
.search-modal.active .search-modal-content {
    transform: translateY(0) scale(1);
}

.search-modal-content h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.search-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.search-input-wrapper input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1.125rem;
    outline: none;
    transition: border-color var(--transition-fast);
}
.search-input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-results {
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.search-result-item:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 5rem 0 4rem;
    text-align: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(ellipse at 50% 0%, rgba(108, 99, 255, 0.15) 0%, transparent 60%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.25rem;
    background: var(--gradient-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.3); }
    50% { box-shadow: 0 0 20px 5px rgba(108, 99, 255, 0.15); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.hero-title .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Search */
.hero-search {
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
}

.hero-search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 1.125rem;
    outline: none;
    transition: all var(--transition-normal);
}
.hero-search-input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.hero-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Stats Row */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}
.hero-stat {
    text-align: center;
}
.hero-stat-number {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ==========================================================================
   Tool Cards & Grid
   ========================================================================== */
.tools-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem;
    margin-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.category-tab:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}
.category-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* Tool Cards Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.tool-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}
.tool-card:hover::before { opacity: 1; }

.tool-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    transition: transform var(--transition-bounce);
}
.tool-card:hover .tool-card-icon { transform: scale(1.15) rotate(-5deg); }

.tool-card-icon.cat-text { background: rgba(108, 99, 255, 0.15); }
.tool-card-icon.cat-pdf { background: rgba(255, 101, 132, 0.15); }
.tool-card-icon.cat-image { background: rgba(0, 210, 255, 0.15); }
.tool-card-icon.cat-dev { background: rgba(0, 230, 118, 0.15); }
.tool-card-icon.cat-calc { background: rgba(255, 145, 0, 0.15); }
.tool-card-icon.cat-convert { background: rgba(245, 0, 87, 0.15); }
.tool-card-icon.cat-social { background: rgba(255, 214, 0, 0.15); }
.tool-card-icon.cat-generator { background: rgba(139, 133, 255, 0.15); }
.tool-card-icon.cat-seo { background: rgba(255, 107, 53, 0.15); }
.tool-card-icon.cat-encode { background: rgba(0, 188, 212, 0.15); }

.tool-card-info { flex: 1; min-width: 0; }
.tool-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}
.tool-card-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    transition: all var(--transition-fast);
    align-self: center;
}
.tool-card:hover .tool-card-arrow {
    background: var(--primary);
    color: white;
    transform: translateX(3px);
}

/* ==========================================================================
   Features / USP Section
   ========================================================================== */
.features-section {
    padding: 5rem 0;
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition-normal);
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
    padding: 5rem 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    padding: 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
}
.faq-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}
.faq-question .q-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 2.25rem;
    font-size: 0.9375rem;
}

/* ==========================================================================
   Tool Page Styles
   ========================================================================== */
.tool-container {
    padding: 2rem 0 4rem;
    min-height: 60vh;
}

.tool-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2.5rem 0;
}

.tool-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 0.75rem;
}

.tool-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.tool-interface {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    outline: none;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236C63FF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.5);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.1);
}

.tool-result {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.tool-content {
    padding: 2rem 0;
}

.tool-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}
.tool-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}
.tool-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}
.tool-content ul, .tool-content ol {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}
.tool-content li { margin-bottom: 0.5rem; }
.tool-content strong { color: var(--text-primary); }

.tool-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 1rem 0;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.footer-social a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.footer-column h5 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column li {
    margin-bottom: 0.5rem;
}
.footer-column a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}
.footer-column a:hover { color: var(--primary-light); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .faq-grid {
        grid-template-columns: 1fr;
    }
    .hero-stats { gap: 1.5rem; }
    .hero-stat-number { font-size: 1.5rem; }
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for tool cards */
.tool-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardReveal 0.5s ease forwards;
}
.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }
.tool-card:nth-child(6) { animation-delay: 0.3s; }
.tool-card:nth-child(7) { animation-delay: 0.35s; }
.tool-card:nth-child(8) { animation-delay: 0.4s; }
.tool-card:nth-child(9) { animation-delay: 0.45s; }
.tool-card:nth-child(10) { animation-delay: 0.5s; }
.tool-card:nth-child(n+11) { animation-delay: 0.55s; }

@keyframes cardReveal {
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box {
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: ctaGlow 8s ease-in-out infinite;
}

@keyframes ctaGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

.cta-box h2 {
    font-size: 2.25rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}
.cta-box p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.cta-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    padding: 0.75rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.breadcrumbs a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { margin: 0 0.5rem; }

/* ==========================================================================
   Widget / Sidebar
   ========================================================================== */
.widget {
    margin-bottom: 1.5rem;
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.widget ul {
    list-style: none;
    padding: 0;
}
.widget li {
    margin-bottom: 0.5rem;
}
.widget a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}
.widget a:hover { color: var(--primary); }

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* AdSense Placeholder */
.ad-slot {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin: 1.5rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Print styles */
@media print {
    .site-header, .site-footer, .liquid-bg, .ad-slot, .search-modal { display: none !important; }
    body { background: white; color: black; }
    .tool-interface { border: 1px solid #ddd; }
}
