/* ============================================================
   DevTools Hub — SUPER ENHANCED Modern Theme
   Particle BG | Glassmorphism | 3D Tilt | Micro-interactions
   ============================================================ */

:root {
    --bg-primary: #06060b;
    --bg-secondary: #0c0c16;
    --bg-card: #11111d;
    --bg-card-hover: #18182b;
    --bg-surface: #141425;
    --border: #1e1e38;
    --border-light: #262644;
    --text-primary: #eeeef6;
    --text-secondary: #9d9db8;
    --text-muted: #646480;
    --accent: #7c3aed;
    --accent-light: #a78bfa;
    --accent-glow: rgba(124, 58, 237, 0.35);
    --green: #10b981;
    --red: #ef4444;
    --yellow: #f59e0b;
    --cyan: #06b6d4;
    --orange: #f97316;
    --pink: #ec4899;
    --gradient-1: linear-gradient(135deg, #7c3aed, #06b6d4);
    --gradient-2: linear-gradient(135deg, #ec4899, #f97316);
    --gradient-3: linear-gradient(135deg, #10b981, #06b6d4);
    --gradient-hero: linear-gradient(135deg, #7c3aed 0%, #a78bfa 30%, #06b6d4 70%, #10b981 100%);
    --glass-bg: rgba(17, 17, 29, 0.6);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur: 20px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow: 0 4px 24px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.6);
    --shadow-accent: 0 0 40px rgba(124, 58, 237, 0.3);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ========== LIGHT THEME ========== */
[data-theme="light"] {
    --bg-primary: #f8f7ff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f3f0ff;
    --bg-surface: #faf9ff;
    --border: #e2dff0;
    --border-light: #eeeaf8;
    --text-primary: #1a1035;
    --text-secondary: #5c5480;
    --text-muted: #9088b0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.08);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* ========== ANIMATED PARTICLE BACKGROUND ========== */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

[data-theme="light"] #particleCanvas { opacity: 0.3; }

/* ========== CURSOR GLOW ========== */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

main { position: relative; z-index: 1; }

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 32px);
    max-width: 1280px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    transition: all var(--transition-smooth);
    padding: 0 6px;
}

.navbar.scrolled {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.nav-container {
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.3px;
}

.logo-icon {
    font-size: 1.5rem;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.logo-accent {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.nav-links { display: flex; gap: 28px; }

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: color var(--transition);
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width var(--transition-bounce);
    border-radius: 1px;
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

.theme-toggle {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: 50%;
}

.theme-toggle:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
    transform: rotate(5deg) scale(1.08);
}

.theme-toggle:hover::before { opacity: 0.15; }

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 80px 24px 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 20% 70%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
    animation: heroBgShift 12s ease-in-out infinite alternate;
}

@keyframes heroBgShift {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.08) translate(2%, -1%); }
}

/* Floating shapes */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    z-index: 0;
}

.hero::before {
    width: 400px; height: 400px;
    background: var(--accent);
    top: -10%; left: -5%;
    animation: floatShape1 20s ease-in-out infinite;
}

.hero::after {
    width: 350px; height: 350px;
    background: var(--cyan);
    bottom: -10%; right: -5%;
    animation: floatShape2 18s ease-in-out infinite;
}

@keyframes floatShape1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, 40px) scale(1.2); }
    50% { transform: translate(60px, -30px) scale(0.8); }
    75% { transform: translate(-40px, -60px) scale(1.15); }
}

@keyframes floatShape2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-80px, -50px) scale(1.3); }
    66% { transform: translate(40px, 60px) scale(0.75); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--accent-light);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 28px;
    animation: fadeInUp 0.8s ease-out 0.05s both;
}

.hero-badge .pulse-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -2px;
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.25s both;
}

.hero-search {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.35s both;
}

.hero-search input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: all var(--transition-smooth);
    outline: none;
    box-shadow: var(--shadow);
}

.hero-search input:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent), var(--shadow);
    transform: translateY(-2px);
}

.hero-search input::placeholder { color: var(--text-muted); }

.hero-search::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    font-size: 1rem;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.search-results.active { display: block; animation: fadeInUp 0.2s ease-out; }

.search-result-item {
    padding: 12px 18px;
    cursor: pointer;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card-hover); }
.search-result-item .icon { font-size: 1.4rem; }
.search-result-item .name { font-weight: 500; }
.search-result-item .cat {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 2px 10px;
    border-radius: 50px;
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 2;
    animation: bounce 2s infinite;
}

.mouse {
    width: 22px;
    height: 34px;
    border: 2px solid var(--text-muted);
    border-radius: 11px;
    position: relative;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: var(--accent);
    border-radius: 1.5px;
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; top: 5px; }
    100% { opacity: 0; top: 20px; }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ========== KEYFRAMES ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========== SECTIONS ========== */
.tools-section, .recent-section, .cta-section {
    padding: 80px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    display: inline-block;
}

.section-header h2 .highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ========== TOOL TABS ========== */
.tool-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 44px;
}

.tab-btn {
    padding: 10px 22px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-sans);
    transition: all var(--transition-bounce);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: 50px;
    z-index: 0;
}

.tab-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tab-btn:hover::before { opacity: 0.08; }

.tab-btn.active {
    background: var(--gradient-1);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-accent);
    font-weight: 600;
}

.tab-btn.active::before { opacity: 1; }
.tab-btn span { position: relative; z-index: 1; }

/* ========== TOOLS GRID ========== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-smooth);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform-style: preserve-3d;
    perspective: 800px;
}

.tool-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.2);
    z-index: 10;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 0;
    border-radius: var(--radius-xl);
}

.tool-card:hover::before { opacity: 0.04; }

.tool-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(124, 58, 237, 0.2) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
    border-radius: var(--radius-xl);
}

.tool-card:hover .tool-glow { opacity: 1; }

/* Card inner elements (above glow) */
.tool-card > * { position: relative; z-index: 2; }

.tool-icon {
    font-size: 2.8rem;
    width: 60px;
    height: 60px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-bounce);
    border: 1px solid var(--border);
}

.tool-card:hover .tool-icon {
    background: var(--gradient-1);
    transform: scale(1.12) rotate(-8deg);
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}

.tool-info h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.tool-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.tool-link {
    margin-top: auto;
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

.tool-link::after {
    content: '';
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width var(--transition-bounce);
}

.tool-link:hover {
    color: var(--accent);
    gap: 10px;
}

.tool-link:hover::after { width: 100%; }

.tool-card.hidden { display: none; }

/* ========== NO RESULTS ========== */
.no-results { text-align: center; padding: 80px 20px; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-state span { font-size: 4rem; animation: bounce 2s infinite; }
.empty-state h3 { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.empty-state p { color: var(--text-muted); max-width: 320px; }

.empty-state button {
    padding: 12px 28px;
    background: var(--gradient-1);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: all var(--transition-bounce);
    box-shadow: var(--shadow-accent);
}

.empty-state button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

/* ========== STATS SECTION ========== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto 60px;
    padding: 0 24px;
}

.stat-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 36px 24px;
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-1);
    transition: width var(--transition-smooth);
    border-radius: 3px 3px 0 0;
}

.stat-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.stat-item:hover::after { width: 60%; }

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== POPULAR SLIDER ========== */
.popular-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.popular-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.popular-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: var(--gradient-2);
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: 0 0 0 100%;
    z-index: 0;
}

.popular-card:hover {
    transform: translateY(-4px);
    border-color: var(--pink);
    box-shadow: 0 12px 40px rgba(236, 72, 153, 0.15);
}

.popular-card:hover::before { opacity: 0.1; }

.popular-card > * { position: relative; z-index: 1; }

.popular-icon { font-size: 2.2rem; display: block; margin-bottom: 14px; }
.popular-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.popular-card p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }

.popular-card a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.popular-card a:hover { color: var(--pink); }

/* ========== CTA SECTION ========== */
.cta-section { text-align: center; }

.cta-content {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 70px 48px;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 14px;
    position: relative;
    letter-spacing: -0.5px;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    position: relative;
}

.request-form {
    display: flex;
    gap: 12px;
    position: relative;
    max-width: 460px;
    margin: 0 auto;
}

.request-form input {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-smooth);
}

.request-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.request-form button {
    padding: 14px 28px;
    background: var(--gradient-1);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-bounce);
    white-space: nowrap;
    box-shadow: var(--shadow-accent);
    font-size: 0.9rem;
}

.request-form button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 36px rgba(124, 58, 237, 0.5);
}

.request-form button:active { transform: scale(0.97); }

/* ========== FOOTER ========== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 24px 30px;
    margin-top: 20px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    display: block;
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 340px;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}

.footer-col h4 {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 10px;
    transition: all var(--transition);
    width: fit-content;
}

.footer-col a:hover {
    color: var(--accent-light);
    transform: translateX(4px);
}

.footer-bottom {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========== CONFETTI ========== */
.confetti-piece {
    position: fixed;
    width: 12px;
    height: 12px;
    top: -20px;
    z-index: 9999;
    pointer-events: none;
    animation: confettiFall linear forwards;
    border-radius: 3px;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    80% { opacity: 0.8; }
    100% { transform: translateY(100vh) rotate(720deg) scale(0.3); opacity: 0; }
}

/* ========== TOAST ENHANCED ========== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--green);
    color: var(--green);
    padding: 14px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.85rem;
    transform: translateY(120px);
    opacity: 0;
    transition: all var(--transition-bounce);
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: var(--red); color: var(--red); box-shadow: 0 8px 32px rgba(239, 68, 68, 0.2); }

/* ========== TOOL PAGE (ENHANCED) ========== */
.tool-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 110px 24px 60px;
    animation: fadeInUp 0.5s ease-out;
}

.tool-page-header {
    text-align: center;
    margin-bottom: 44px;
}

.tool-page-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.tool-page-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.tool-form {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 36px;
    box-shadow: var(--shadow);
}

.tool-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    letter-spacing: -0.2px;
}

.tool-form textarea,
.tool-form input[type="text"],
.tool-form input[type="url"],
.tool-form select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 130px;
    outline: none;
    transition: all var(--transition-smooth);
    margin-bottom: 22px;
}

.tool-form textarea:focus,
.tool-form input:focus,
.tool-form select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    transform: translateY(-1px);
}

.tool-form input[type="range"] {
    width: 100%;
    margin-bottom: 8px;
    accent-color: var(--accent);
}

.tool-form input[type="checkbox"],
.tool-form input[type="radio"] {
    accent-color: var(--accent);
    transform: scale(1.2);
    margin-right: 4px;
}

.tool-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.btn:active { transform: scale(0.95); }

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.btn-copy {
    background: var(--green);
    color: #000;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-copy:hover {
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.btn-clear {
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
}

.btn-clear:hover {
    background: rgba(239, 68, 68, 0.1);
}

.result-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-all;
    min-height: 80px;
    white-space: pre-wrap;
    transition: all var(--transition);
    line-height: 1.7;
}

.result-box:empty::before {
    content: 'Hasil akan tampil di sini...';
    color: var(--text-muted);
    font-style: italic;
}

.result-box:not(:empty) {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    animation: fadeInScale 0.3s ease-out;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .navbar { width: calc(100% - 16px); border-radius: var(--radius-xl); }
    .nav-links { display: none; }
    .tools-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1rem; }
    .tool-tabs { gap: 6px; }
    .tab-btn { padding: 8px 16px; font-size: 0.78rem; }
    .request-form { flex-direction: column; }
    .stats-section { grid-template-columns: repeat(2, 1fr); }
    .cta-content { padding: 44px 24px; }
    .popular-slider { grid-template-columns: 1fr; }
    .tool-form { padding: 24px; }
    .tool-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .tool-card { padding: 20px; }
    .stats-section { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 1.6rem; }
}