/* ============================================
   WOOTILS — Global Styles
   ============================================ */

:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #4834D4;
    --accent: #00D2D3;
    --accent-light: #55EFC4;
    --bg: #0F0F1A;
    --bg-card: #1A1A2E;
    --bg-card-hover: #222240;
    --bg-surface: #16162A;
    --text: #E8E8F0;
    --text-muted: #8888A8;
    --text-dim: #5A5A7A;
    --border: #2A2A45;
    --success: #00B894;
    --warning: #FDCB6E;
    --error: #FF6B6B;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
    --transition: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text);
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 16px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.search-box .material-symbols-rounded {
    color: var(--text-dim);
    font-size: 20px;
}

.search-box input {
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    width: 200px;
}

.search-box input::placeholder {
    color: var(--text-dim);
}

.lang-switcher {
    display: flex;
    gap: 4px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    padding: 3px;
    border: 1px solid var(--border);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.lang-btn:hover {
    color: var(--text);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

/* ============================================
   Hero
   ============================================ */

.hero {
    position: relative;
    padding: 140px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108, 92, 231, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 30% 20%, rgba(0, 210, 211, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    color: var(--primary-light);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 32px;
    letter-spacing: 0.02em;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 50%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    max-width: 600px;
    margin: 0 auto 48px;
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ============================================
   Categories
   ============================================ */

.categories {
    padding: 40px 0 20px;
    position: sticky;
    top: 64px;
    z-index: 50;
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(16px);
}

.category-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    font-family: inherit;
}

.pill:hover {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--text-dim);
}

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

/* ============================================
   Tools Grid
   ============================================ */

.tools-section {
    padding: 40px 0 80px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(108, 92, 231, 0.1);
}

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

.tool-emoji {
    font-size: 2.2rem;
    line-height: 1;
}

.tool-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.tool-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.tool-tag {
    display: inline-block;
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary-light);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
    margin-top: auto;
}

/* ============================================
   Features
   ============================================ */

.features {
    padding: 80px 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

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

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 48px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-brand p {
    width: 100%;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 4px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-bottom {
    padding-top: 24px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ============================================
   Tool Page Layout
   ============================================ */

.tool-page {
    padding: 100px 0 60px;
}

.tool-page .container {
    max-width: 800px;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.tool-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.tool-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.tool-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tool-body input,
.tool-body textarea,
.tool-body select {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    margin-bottom: 20px;
}

.tool-body input:focus,
.tool-body textarea:focus,
.tool-body select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.tool-body textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-dim);
}

.result-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 24px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--accent);
}

.input-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.input-row > div {
    flex: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 24px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--text);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .nav-links, .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-stats {
        gap: 32px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .input-row {
        flex-direction: column;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tool-card {
    animation: fadeIn 0.4s ease both;
}

.tool-card:nth-child(1) { animation-delay: 0.02s; }
.tool-card:nth-child(2) { animation-delay: 0.04s; }
.tool-card:nth-child(3) { animation-delay: 0.06s; }
.tool-card:nth-child(4) { animation-delay: 0.08s; }
.tool-card:nth-child(5) { animation-delay: 0.10s; }
.tool-card:nth-child(6) { animation-delay: 0.12s; }
.tool-card:nth-child(7) { animation-delay: 0.14s; }
.tool-card:nth-child(8) { animation-delay: 0.16s; }
.tool-card:nth-child(9) { animation-delay: 0.18s; }
.tool-card:nth-child(10) { animation-delay: 0.20s; }
.tool-card:nth-child(11) { animation-delay: 0.22s; }
.tool-card:nth-child(12) { animation-delay: 0.24s; }

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--success);
    color: var(--text);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    box-shadow: var(--shadow);
}

/* ============================================
   Mobile Menu
   ============================================ */

.navbar.mobile-open .nav-links,
.navbar.mobile-open .nav-actions {
    display: flex !important;
}

@media (max-width: 768px) {
    .navbar.mobile-open .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding-bottom: 16px;
    }
    .navbar.mobile-open .nav-links {
        order: 10;
        width: 100%;
        flex-direction: column;
        gap: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    .navbar.mobile-open .nav-actions {
        order: 11;
        width: 100%;
        justify-content: center;
        padding-top: 12px;
    }
    .navbar.mobile-open .search-box {
        flex: 1;
    }
    .navbar.mobile-open .search-box input {
        width: 100%;
    }
}

/* ============================================
   Smoother Hover Animations
   ============================================ */

.tool-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                border-color 0.3s ease, 
                box-shadow 0.4s ease;
}

.tool-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(108, 92, 231, 0.15);
}

.tool-card:active {
    transform: translateY(-2px) scale(0.99);
    transition-duration: 0.1s;
}

.tool-emoji {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tool-card:hover .tool-emoji {
    transform: scale(1.15) rotate(-5deg);
}

.feature-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease,
                box-shadow 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.btn {
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.btn:active {
    transform: translateY(0) scale(0.97);
}

.pill {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pill:hover {
    transform: translateY(-2px);
}
