/* ==========================================================================
   AI Tool Yard — Dark + Neon Gradient Design System
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
    /* Surfaces */
    --bg-base:     #0a0a14;
    --bg-elevated: #12121f;
    --bg-glass:    rgba(255, 255, 255, 0.04);
    --bg-glass-hover: rgba(255, 255, 255, 0.07);
    --border:      rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);

    /* Text */
    --text-primary: #f4f4f8;
    --text-secondary: #c4c4d4;
    --text-muted:  #8a8a9c;
    --text-faint:  #5a5a6c;

    /* Accents */
    --accent-purple: #8b5cf6;
    --accent-cyan:   #06b6d4;
    --accent-pink:   #ec4899;
    --accent-green:  #10b981;
    --accent-amber:  #f59e0b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --gradient-warm:    linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
    --gradient-text:    linear-gradient(135deg, #c4b5fd 0%, #67e8f9 50%, #f0abfc 100%);

    /* Glow */
    --glow-purple: 0 0 40px rgba(139, 92, 246, 0.35);
    --glow-cyan:   0 0 40px rgba(6, 182, 212, 0.35);
    --glow-pink:   0 0 40px rgba(236, 72, 153, 0.35);

    /* Type */
    --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Shape */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    /* Transition */
    --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Page-wide ambient gradient orbs (fixed, behind everything) */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
}
body::before {
    width: 600px; height: 600px;
    background: var(--accent-purple);
    top: -200px; left: -200px;
}
body::after {
    width: 500px; height: 500px;
    background: var(--accent-cyan);
    bottom: -150px; right: -150px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; }

::selection { background: var(--accent-purple); color: white; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ---------- Layout ---------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.section-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--t-fast);
}
.section-link:hover { color: var(--accent-cyan); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--t-base);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.55);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
    padding: 8px 16px;
}
.btn-text:hover { color: var(--accent-cyan); }

.btn-large { padding: 16px 32px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 24px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.logo::before {
    content: '';
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--gradient-primary);
    box-shadow: var(--glow-purple);
    flex-shrink: 0;
}

.nav-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}
.nav-search input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border-radius: var(--radius-pill);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--t-base);
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search input:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: var(--bg-glass-hover);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.nav-search::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    font-size: 0.85rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}
.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    transition: all var(--t-fast);
}
.nav-menu a:hover { color: var(--text-primary); background: var(--bg-glass); }
.nav-menu .btn-primary { color: white; padding: 10px 20px; }
.nav-menu .btn-primary:hover { background: var(--gradient-primary); }

.nav-toggle {
    display: none;
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.25rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 100px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.hero-orbs span {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: float 18s ease-in-out infinite;
}
.hero-orbs span:nth-child(1) {
    width: 320px; height: 320px;
    background: var(--accent-purple);
    top: 10%; left: 15%;
    animation-delay: 0s;
}
.hero-orbs span:nth-child(2) {
    width: 280px; height: 280px;
    background: var(--accent-cyan);
    top: 30%; right: 10%;
    animation-delay: -6s;
}
.hero-orbs span:nth-child(3) {
    width: 240px; height: 240px;
    background: var(--accent-pink);
    bottom: 5%; left: 40%;
    animation-delay: -12s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 40px) scale(0.95); }
}

.hero .container { position: relative; z-index: 1; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.hero-eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.search-box {
    max-width: 640px;
    margin: 0 auto 48px;
    position: relative;
}
.search-box form {
    display: flex;
    gap: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all var(--t-base);
}
.search-box form:focus-within {
    border-color: var(--accent-purple);
    box-shadow: var(--glow-purple);
}
.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 12px 20px;
    font-size: 1rem;
    outline: none;
}
.search-input::placeholder { color: var(--text-muted); }

.stats {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 28px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 140px;
}
.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---------- Categories Grid ---------- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.category-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}
.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--t-base);
    z-index: -1;
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--glow-purple);
}
.category-card .cat-icon {
    font-size: 2rem;
    line-height: 1;
}
.category-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}
.category-card .cat-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- Tool Cards ---------- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tools-rail {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.tools-rail .tool-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
}
.tools-rail::-webkit-scrollbar { height: 6px; }

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%),
                rgba(139, 92, 246, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity var(--t-base);
    pointer-events: none;
}
.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--glow-purple);
}
.tool-card:hover::before { opacity: 1; }

.tool-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tool-logo, .tool-logo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.tool-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--gradient-primary);
    color: white;
}

.tool-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tool-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: auto;
}

.category-badge, .pricing-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.category-badge {
    background: var(--bg-glass);
    color: var(--text-secondary);
}

.pricing-badge {
    text-transform: capitalize;
    background: var(--bg-glass);
    color: var(--text-secondary);
}
.pricing-badge.pricing-free {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border-color: rgba(16, 185, 129, 0.25);
}
.pricing-badge.pricing-freemium {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan);
    border-color: rgba(6, 182, 212, 0.25);
}
.pricing-badge.pricing-paid {
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.3);
}

.rating {
    color: var(--accent-amber);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.rating span { color: var(--text-muted); font-weight: 400; }

.tool-card .btn-secondary {
    margin-top: 4px;
    font-size: 0.85rem;
    padding: 10px 16px;
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}
.metric-pill.up { color: var(--accent-green); border-color: rgba(16,185,129,0.25); }

/* ---------- Browse Page ---------- */
.browse-header {
    padding: 60px 0 40px;
    text-align: center;
}
.browse-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 12px;
}
.browse-header p { color: var(--text-secondary); }

.browse-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
}

.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.filter-section {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.filter-section h3 {
    font-size: 1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-section h3::before {
    content: ''; width: 3px; height: 14px;
    background: var(--gradient-primary); border-radius: 2px;
}

.filter-group { margin-bottom: 18px; }
.filter-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.filter-group select, .filter-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--t-fast);
}
.filter-group select:focus, .filter-group input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.no-results {
    padding: 80px 20px;
    text-align: center;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.no-results h3 { margin-bottom: 8px; }
.no-results p { color: var(--text-muted); }

/* ---------- Tool Detail Page ---------- */
.tool-detail { padding: 60px 0; }

.tool-header {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 40px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tool-logo-large, .tool-logo-placeholder.large {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}
.tool-logo-placeholder.large {
    font-size: 1.6rem;
}

.tool-header-content { flex: 1; min-width: 280px; }
.tool-header-content h1 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 8px;
}
.tool-tagline-large {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.tool-meta-large {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
}
.tool-meta-large .views { color: var(--text-muted); font-size: 0.85rem; }

.tool-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tool-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.tool-section {
    padding: 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.tool-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}
.tool-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.features-list li {
    padding: 12px 16px 12px 40px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    position: relative;
    font-size: 0.9rem;
}
.features-list li::before {
    content: '✓';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-cyan);
    font-weight: 700;
}

/* ---------- Reviews ---------- */
.review-form-container {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.review-form-container h3 {
    font-size: 1.15rem;
    margin-bottom: 20px;
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}
.rating-input input { display: none; }
.rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    filter: grayscale(1) opacity(0.4);
    transition: filter var(--t-fast);
}
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    filter: grayscale(0) opacity(1);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.review-item {
    padding: 20px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.review-header strong { color: var(--text-primary); }
.review-date { color: var(--text-muted); font-size: 0.85rem; margin-left: auto; }
.no-reviews { color: var(--text-muted); padding: 20px; text-align: center; }

/* ---------- Forms (Submit page + general) ---------- */
.submit-page { padding: 60px 0; }
.submit-header {
    text-align: center;
    margin-bottom: 48px;
}
.submit-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 12px;
}
.submit-header p { color: var(--text-secondary); }

.submit-form {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    padding: 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.form-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-group { margin-bottom: 20px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.form-group input[type='text'],
.form-group input[type='email'],
.form-group input[type='url'],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--t-fast);
    font-family: var(--font-body);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.success-message, .error-message {
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}
.success-message {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    text-align: center;
}
.success-message h2 { color: var(--accent-green); margin-bottom: 8px; }
.success-message p { color: var(--text-secondary); margin-bottom: 16px; }
.error-message {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
.form-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; }

/* ---------- CTA Section ---------- */
.cta-section {
    padding: 80px 0;
    text-align: center;
    position: relative;
}
.cta-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 64px 40px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139,92,246,0.12), transparent 50%);
    z-index: 0;
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 16px;
}
.cta-card p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Newsletter inline form */
.newsletter-inline {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 6px;
}
.newsletter-inline input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
}
.newsletter-inline input::placeholder { color: var(--text-muted); }
.newsletter-inline button {
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ---------- Footer ---------- */
.footer {
    margin-top: 80px;
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.04));
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 48px;
}
.footer-col h3, .footer-col h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--t-fast);
}
.footer-col ul a:hover { color: var(--accent-cyan); }

.newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.newsletter-form input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { border-color: var(--accent-purple); }
.newsletter-form button {
    padding: 10px 16px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom a { color: var(--text-muted); transition: color var(--t-fast); }
.footer-bottom a:hover { color: var(--accent-cyan); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .browse-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .section { padding: 56px 0; }
    .navbar .container { flex-wrap: wrap; }
    .nav-search { order: 3; flex-basis: 100%; max-width: none; }
    .nav-menu { gap: 4px; }
    .nav-menu li:not(:last-child) { display: none; }
    .nav-toggle { display: inline-flex; }
    .nav-menu.is-open { display: flex; flex-direction: column; position: fixed; top: 70px; left: 16px; right: 16px; padding: 16px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); }
    .nav-menu.is-open li { display: block; width: 100%; }
    .nav-menu.is-open a { display: block; padding: 12px 16px; }

    .hero { padding: 60px 0 60px; }
    .stats { gap: 12px; }
    .stat { min-width: 100px; padding: 12px 16px; }
    .stat-number { font-size: 1.5rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .tools-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }

    .tool-header { padding: 24px; gap: 20px; }
    .tool-logo-large, .tool-logo-placeholder.large { width: 72px; height: 72px; }
    .form-section, .tool-section { padding: 20px; }
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: 1fr; }
    .search-box form { padding: 4px; }
    .search-input { padding: 10px 14px; font-size: 0.9rem; }
    .btn-large { padding: 12px 24px; }
    .newsletter-inline { flex-direction: column; padding: 12px; border-radius: var(--radius-md); }
    .newsletter-inline button { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .hero-orbs span { animation: none; }
}

/* ==========================================================================
   Admin Panel — minimal styling layered on the design system
   ========================================================================== */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 24px;
    padding: 0 12px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--t-fast);
}
.admin-nav a:hover { background: var(--bg-glass); color: var(--text-primary); }
.admin-nav a.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 12px rgba(139,92,246,0.3);
}

.admin-content {
    padding: 32px;
    overflow-x: auto;
}
.admin-header { margin-bottom: 32px; }
.admin-header h1 {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.admin-stat-card, .stat-card {
    padding: 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
}
.admin-stat-card .num, .stat-card h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.admin-stat-card .label, .stat-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.admin-section {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.admin-section h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th, td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
td { color: var(--text-secondary); }
tbody tr:hover { background: var(--bg-glass); }

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 500;
}
.status-pending { background: rgba(245,158,11,0.15); color: var(--accent-amber); }
.status-approved { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.status-rejected { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-form, .login-box {
    max-width: 400px;
    width: 100%;
    padding: 40px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
}
.login-form h1, .login-box h1 {
    font-size: 1.75rem;
    margin-bottom: 24px;
    text-align: center;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-content { padding: 20px; }
}
