/* AI Catalog - Premium Modern Dark Theme */
/* Inspired by: Linear, Stripe, Vercel, Raycast */
/* Font loading premesteno u HTML <head> za bolje performanse */

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

:root {
    /* Light backgrounds (DEFAULT) */
    --bg-dark: #ffffff;
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-card-hover: rgba(0, 0, 0, 0.04);
    --bg-elevated: rgba(0, 0, 0, 0.03);
    --bg-input: rgba(0, 0, 0, 0.04);
    --bg-glass: rgba(255, 255, 255, 0.8);

    /* Borders */
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    --border-glow: rgba(139, 92, 246, 0.3);

    /* Text */
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;

    /* Primary colors */
    --primary: #7c3aed;
    --primary-light: #8b5cf6;
    --primary-dark: #6d28d9;
    --primary-glow: rgba(139, 92, 246, 0.1);

    /* Accent colors */
    --accent: #06b6d4;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-green: #10b981;

    /* Gradients */
    --gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --gradient-text: linear-gradient(135deg, #7c3aed 0%, #0891b2 100%);
    --gradient-pink: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --gradient-warm: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
    --gradient-border: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(6, 182, 212, 0.5), rgba(236, 72, 153, 0.5));

    /* Status colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Effects */
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.1);
    --shadow-glow-strong: 0 0 80px rgba(139, 92, 246, 0.15);
    --blur: none;
    --blur-strong: none;

    /* Radius */
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

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

/* Dark Theme */
[data-theme="dark"] {
    /* Dark backgrounds */
    --bg-dark: #2c2c2e;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-elevated: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-glass: rgba(15, 15, 20, 0.7);

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(139, 92, 246, 0.4);

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Primary colors */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.15);

    /* Effects */
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.15);
    --shadow-glow-strong: 0 0 80px rgba(139, 92, 246, 0.25);

    /* Gradients for dark */
    --gradient-subtle: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    --gradient-text: linear-gradient(135deg, #c4b5fd 0%, #67e8f9 100%);
}

[data-theme="dark"] body {
    background: #2c2c2e;
}

/* Keep light theme selector for backwards compatibility */
[data-theme="light"] {
    /* Light backgrounds */
    --bg-dark: #ffffff;
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-card-hover: rgba(0, 0, 0, 0.04);
    --bg-elevated: rgba(0, 0, 0, 0.03);
    --bg-input: rgba(0, 0, 0, 0.04);
    --bg-glass: rgba(255, 255, 255, 0.8);
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    --border-glow: rgba(139, 92, 246, 0.3);
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --primary: #7c3aed;
    --primary-light: #8b5cf6;
    --primary-dark: #6d28d9;
    --primary-glow: rgba(139, 92, 246, 0.1);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.1);
    --shadow-glow-strong: 0 0 80px rgba(139, 92, 246, 0.15);
    --gradient-subtle: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
    --gradient-text: linear-gradient(135deg, #7c3aed 0%, #0891b2 100%);
}

[data-theme="light"] body {
    background: #fdfcfc;
}

[data-theme="light"] .app-layout.homepage-layout {
    background: #fdfcfc !important;
}

[data-theme="light"] .app-layout.homepage-layout * {
    box-sizing: border-box;
}

[data-theme="light"] .top-header {
    background: transparent;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Force dark-mode styling on header while over hero (homepage only) */
[data-theme="light"] .top-header:not(.scrolled):not(.inner-page) {
    --text-primary: #ffffff;
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    border-bottom-color: transparent;
}
[data-theme="light"] .top-header:not(.scrolled):not(.inner-page) .header-avatar { color: white; border-color: rgba(255,255,255,0.3); }
[data-theme="light"] .top-header:not(.scrolled):not(.inner-page) .header-avatar:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }
[data-theme="light"] .top-header:not(.scrolled):not(.inner-page) .header-avatar .avatar-letter { background: rgba(255,255,255,0.2); }
[data-theme="light"] .top-header:not(.scrolled):not(.inner-page) .theme-toggle:hover { background: rgba(255,255,255,0.08); }
[data-theme="light"] .top-header:not(.scrolled):not(.inner-page) .header-icon-btn:hover { background: rgba(255,255,255,0.08); }

[data-theme="light"] .sidebar {
    background: #fdfcfc;
    border-right-color: transparent;
}

[data-theme="light"] .homepage-sidebar {
    background: transparent;
    border-right-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .sidebar-link,
[data-theme="light"] .sidebar-category-link,
[data-theme="light"] .sidebar-section-header,
[data-theme="light"] .sidebar-nav span,
[data-theme="light"] .cat-name,
[data-theme="light"] .trending-name,
[data-theme="light"] .trending-item,
[data-theme="light"] .sidebar-badge,
[data-theme="light"] .user-plan {
    color: #334155;
}

[data-theme="light"] .cat-count {
    color: #64748b;
    background: none;
    padding: 0;
}

[data-theme="light"] .sidebar-link:hover,
[data-theme="light"] .sidebar-category-link:hover {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .sidebar-link.active {
    background: rgba(0, 0, 0, 0.06);
    color: #1f1f1f;
}

/* Sidebar icons keep their inline colors in both modes */

[data-theme="light"] .hero-premium {
    background: #fdfcfc;
}

[data-theme="light"] .hero-premium::before {
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}

[data-theme="light"] .hero-orb-1 {
    background: rgba(139, 92, 246, 0.7);
    box-shadow:
        0 0 15px rgba(139, 92, 246, 0.8),
        0 0 30px rgba(139, 92, 246, 0.4);
}

[data-theme="light"] .hero-orb-2 {
    background: rgba(6, 182, 212, 0.7);
    box-shadow:
        0 0 15px rgba(6, 182, 212, 0.8),
        0 0 30px rgba(6, 182, 212, 0.4);
}

[data-theme="light"] .hero-orb-3 {
    background: rgba(236, 72, 153, 0.6);
    box-shadow:
        0 0 15px rgba(236, 72, 153, 0.8),
        0 0 30px rgba(236, 72, 153, 0.4);
}

[data-theme="light"] .hero-grid::before {
    background: rgba(139, 92, 246, 0.5);
    box-shadow:
        0 0 10px rgba(139, 92, 246, 0.7),
        0 0 20px rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .hero-grid::after {
    background: rgba(6, 182, 212, 0.5);
    box-shadow:
        0 0 10px rgba(6, 182, 212, 0.7),
        0 0 20px rgba(6, 182, 212, 0.3);
}

[data-theme="light"] .hero-grid {
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cstyle%3E .wire %7B fill: none; stroke-width: 0.6; opacity: 0.5; %7D %3C/style%3E%3C/defs%3E%3Cg%3E%3C!-- Connected network mesh --%3E%3Cpath class='wire' stroke='%237c3aed' d='M0,200 L200,100 L400,200 L600,100 L800,200'/%3E%3Cpath class='wire' stroke='%230891b2' d='M0,300 L200,400 L400,300 L600,400 L800,300'/%3E%3Cpath class='wire' stroke='%23db2777' d='M200,100 L200,400'/%3E%3Cpath class='wire' stroke='%237c3aed' d='M400,200 L400,300'/%3E%3Cpath class='wire' stroke='%230891b2' d='M600,100 L600,400'/%3E%3Cpath class='wire' stroke='%23db2777' d='M100,150 L300,250 L500,150 L700,250'/%3E%3Cpath class='wire' stroke='%237c3aed' d='M0,250 L800,250'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="light"] .hero-title-gradient {
    color: #000000;
    -webkit-text-fill-color: #000000;
}

[data-theme="light"] .hero-subtitle,
[data-theme="light"] .hero-subtitle strong {
    color: #475569;
    text-shadow: none;
}

[data-theme="light"] .hero-announcement {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

[data-theme="light"] .hero-announcement .announcement-text {
    color: #ffffff;
}

[data-theme="light"] .hero-search-tags,
[data-theme="light"] .hero-search-tags span,
[data-theme="light"] .hero-search-tags a {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .hero-search-tags a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .hero-stat-card {
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
}

[data-theme="light"] .hero-stat-card .stat-number,
[data-theme="light"] .hero-stat-card .stat-label {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .hero-search-box {
    background: #eeeef0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hero-search-box:focus-within {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

[data-theme="light"] .hero-search-box input {
    color: #1f1f1f;
}

[data-theme="light"] .hero-search-box input::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .search-icon-wrap {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .chat-textarea::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .chat-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .btn-primary {
    background: #1f1f1f;
    color: #ffffff !important;
    border: none;
}

[data-theme="light"] .btn-primary:hover {
    background: #333333;
}

[data-theme="light"] .trusted-label {
    color: #1f1f1f;
}

[data-theme="light"] .ai-company-logo {
    color: #1f1f1f;
}

[data-theme="light"] .tool-icon-name {
    color: #1f1f1f;
}

/* Catalog page light mode */
[data-theme="light"] .tool-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .tool-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .tool-logo {
    background: #fdfcfc;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .filters .search-box input,
[data-theme="light"] .filter-btn {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .filters .search-box input:focus,
[data-theme="light"] .filter-btn:focus {
    border-color: var(--primary);
}

[data-theme="light"] .section {
    background: #fdfcfc;
}

[data-theme="light"] .features-section {
    background: #fdfcfc;
}

[data-theme="light"] .main-content {
    background: transparent;
}

/* Hide gradient background effects in light mode */
[data-theme="light"] .app-layout::before,
[data-theme="light"] .app-layout::after,
[data-theme="light"] .main-content::before,
[data-theme="light"] .main-content::after {
    display: none;
}

[data-theme="light"] .tools-showcase,
[data-theme="light"] .tools-content,
[data-theme="light"] .app-layout.homepage-layout .tools-showcase,
[data-theme="light"] .app-layout.homepage-layout .tools-showcase .tools-content {
    background: transparent !important;
}

[data-theme="light"] .tool-row,
[data-theme="light"] .tool-row-container,
[data-theme="light"] .tool-icons-scroll,
[data-theme="light"] .tool-icons {
    background: none !important;
}

[data-theme="light"] .pagination a {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .pagination a:hover,
[data-theme="light"] .pagination a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

[data-theme="light"] .header-search {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .header-search:focus-within {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .sidebar-category-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .trusted-by {
    background: #e2e8f0;
    border-color: rgba(0, 0, 0, 0.08);
}


[data-theme="light"] .tool-icon-circle {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .footer,
[data-theme="light"] .site-footer,
[data-theme="light"] footer.site-footer {
    background: #f1f5f9 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #334155 !important;
}

[data-theme="light"] .footer a,
[data-theme="light"] .site-footer a {
    color: #475569;
}

[data-theme="light"] .footer a:hover,
[data-theme="light"] .site-footer a:hover {
    color: var(--primary);
}

[data-theme="light"] .footer .footer-copy,
[data-theme="light"] .site-footer .footer-copy {
    color: #64748b;
}

[data-theme="light"] .top-header.scrolled {
    background: #fdfcfc !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .top-header.scrolled .theme-toggle,
[data-theme="light"] .top-header.scrolled .header-icon-btn {
    color: #1d1d1f;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100%;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ============================================
   ANIMATED MESH GRADIENT BACKGROUND
   ============================================ */

.app-layout {
    display: flex;
    flex: 1;
    min-height: 100vh;
    min-width: 0;
    position: relative;
    overflow: visible;
}

/* Homepage Layout - Sidebar hidden during hero, visible below */
.app-layout.homepage-layout .sidebar {
    display: none;
}

.app-layout.homepage-layout .main-content {
    margin-left: 0;
    overflow-x: hidden;
    overflow-y: visible;
    min-width: 0;
}

/* Homepage tools section */
.app-layout.homepage-layout .tools-showcase {
    display: flex;
    max-width: 1540px;
    margin: 0 auto;
    padding: 0 20px;
}

.app-layout.homepage-layout .tools-showcase .homepage-sidebar {
    width: 260px;
    min-width: 260px;
    padding: 32px 16px 32px 0;
    border-right: none;
    position: sticky;
    top: 70px;
    align-self: stretch;
    overflow-y: auto;
}

/* Homepage menu links - iOS style */
.homepage-sidebar .sidebar-nav .sidebar-link {
    padding: 11px 16px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

[data-theme="light"] .homepage-sidebar .sidebar-nav .sidebar-link {
    border: none !important;
}

.app-layout.homepage-layout .tools-showcase .tools-content {
    flex: 1;
    padding: 32px 0 32px 0;
    width: 100%;
    overflow: visible;
}

.app-layout.homepage-layout .tools-showcase .tools-content .tool-row {
    margin-bottom: 32px;
}

/* Tool row with scroll arrows */
.tool-row-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-row-container .tool-icons-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tool-row-container .tool-icons-scroll::-webkit-scrollbar {
    display: none;
}

.tool-row-container .tool-icons {
    display: flex;
    gap: 2px;
    transition: transform 0.3s ease;
    padding-right: 5px;
}

.tool-row-container .tool-icon-item {
    flex-shrink: 0;
    width: 80px;
}

.tool-row-container .tool-icon-circle {
    width: 72px;
    height: 72px;
}

.tool-row-container .tool-icon-circle img {
    width: 72px;
    height: 72px;
}

/* Scroll arrows */
.scroll-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.scroll-arrow:hover {
    background: transparent;
    color: var(--primary);
}

.scroll-arrow.scroll-left {
    background: transparent;
}

.scroll-arrow.scroll-right {
    display: flex !important;
    visibility: visible !important;
    width: 32px !important;
    height: 32px !important;
}

.scroll-arrow.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.scroll-arrow svg {
    width: 16px;
    height: 16px;
}

/* Light mode scroll arrows */
[data-theme="light"] .scroll-arrow {
    background: transparent;
    border: none;
    color: #1f1f1f;
}

[data-theme="light"] .scroll-arrow:hover {
    background: transparent;
    border: none;
    color: #0f172a;
}

[data-theme="light"] .scroll-arrow.scroll-left {
    background: transparent;
}

/* Homepage sidebar specific styling */
.app-layout.homepage-layout .homepage-sidebar .sidebar-nav {
    padding: 0;
    margin-bottom: 16px;
}

.app-layout.homepage-layout .homepage-sidebar .sidebar-section {
    padding: 0;
    margin-bottom: 20px;
}

.app-layout.homepage-layout .homepage-sidebar .sidebar-section-header {
    padding: 0 8px;
    margin-bottom: 8px;
}

.app-layout::before {
    display: none; /* Uklonjeno šarenilo */
}

@keyframes meshMove {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Animated gradient orbs */
.app-layout::after {
    display: none; /* Uklonjeno šarenilo */
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, 30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

/* Noise texture overlay - DISABLED */
.main-content::before {
    display: none;
}

/* Grid pattern overlay - DISABLED
.main-content::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
} */

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */

.glass {
    background: var(--bg-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
}

.glass-strong {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--border-light);
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0,0,0,0.06);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .theme-icon-light {
    display: none;
}

.header-icon-btn,
.header-icon-btn-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.header-icon-btn:hover,
.header-icon-btn-mobile:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}
[data-theme="light"] .header-icon-btn:hover,
[data-theme="light"] .header-icon-btn-mobile:hover {
    background: rgba(0,0,0,0.06);
}
.header-icon-btn svg,
.header-icon-btn-mobile svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .theme-icon-dark {
    display: block;
}

[data-theme="light"] .theme-toggle .theme-icon-light {
    display: block;
}

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

/* Homepage header buttons - restore borders on home page only */
.top-header:not(.inner-page) .theme-toggle,
.top-header:not(.inner-page) .header-icon-btn,
.top-header:not(.inner-page) .header-text-btn,
.top-header:not(.inner-page) .header-avatar {
    background: transparent;
    border: none;
    border-radius: 999px;
}

.top-header:not(.inner-page) .theme-toggle:hover,
.top-header:not(.inner-page) .header-icon-btn:hover,
.top-header:not(.inner-page) .header-text-btn:hover,
.top-header:not(.inner-page) .header-avatar:hover {
    background: transparent;
    border-color: rgba(255,255,255,0.4);
}

/* ============================================
   GRADIENT BORDER EFFECT
   ============================================ */

.gradient-border {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient-border);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition);
}

.gradient-border:hover::before {
    opacity: 1;
}

/* ============================================
   GLOW EFFECTS
   ============================================ */

.glow {
    position: relative;
}

.glow::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient);
    border-radius: inherit;
    opacity: 0;
    filter: blur(20px);
    transition: var(--transition);
    z-index: -1;
}

.glow:hover::after {
    opacity: 0.4;
}

.glow-always::after {
    opacity: 0.3;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.2; filter: blur(20px); }
    50% { opacity: 0.4; filter: blur(30px); }
}

/* ============================================
   LINKS & BUTTONS
   ============================================ */

a {
    color: inherit;
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-primary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.btn-primary:active {
    background: rgba(255,255,255,0.05);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    backdrop-filter: var(--blur);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.btn-glow {
    animation: btn-glow-pulse 2s ease-in-out infinite;
}

@keyframes btn-glow-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(139, 92, 246, 0.5); }
}

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-full { width: 100%; }

/* ============================================
   CONTAINER
   ============================================ */

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: 290px;
    background: #2c2c2e;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-right: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 10px;
    bottom: 0;
    z-index: 100;
    transition: var(--transition-slow);
    overflow: hidden;
}

/* Fill the 10px gap on the left of sidebar */
.sidebar::before {
    content: '';
    position: fixed;
    top: 60px;
    left: 0;
    width: 10px;
    bottom: 0;
    background: #2c2c2e;
    z-index: -1;
}

[data-theme="light"] .sidebar::before {
    background: #fdfcfc;
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-badge,
.sidebar.collapsed .sidebar-section-header,
.sidebar.collapsed .cat-name,
.sidebar.collapsed .cat-count,
.sidebar.collapsed .trending-name,
.sidebar.collapsed .user-info,
.sidebar.collapsed .sidebar-auth,
.sidebar.collapsed .sidebar-search {
    display: none;
}

.sidebar.collapsed .sidebar-category-link {
    justify-content: center;
    padding: 10px;
}

.sidebar.collapsed .cat-icon { margin: 0; }
.sidebar.collapsed .trending-item { justify-content: center; padding: 8px; }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 16px 8px; }
.sidebar.collapsed .user-logout { display: none; }

/* Sidebar Header - Hidden */
.sidebar-header {
    display: none;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(139, 92, 246, 0.5); }
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.logo-text {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.logo-text .gradient-text {
    color: #06b6d4;
}

[data-theme="light"] .logo-text {
    color: #1f1f1f;
}

[data-theme="light"] .logo-text .gradient-text {
    color: #0b7f94;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

/* Sidebar Content - iOS style */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    min-height: 0;
}

.sidebar-content::-webkit-scrollbar { width: 1px; }
.sidebar-content::-webkit-scrollbar-track { background: transparent; }
.sidebar-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
[data-theme="light"] .sidebar-content::-webkit-scrollbar { width: 0; }
[data-theme="light"] .sidebar-content::-webkit-scrollbar-thumb { background: transparent; }

/* Sidebar Search */
.sidebar-search {
    padding: 0 12px 16px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    transition: var(--transition);
}

.search-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 0 20px rgba(139, 92, 246, 0.1);
}

.search-input-wrap svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.search-input-wrap input::placeholder { color: var(--text-muted); }

/* Sidebar Navigation */
.sidebar-nav {
    padding: 0 8px;
    margin-bottom: 8px;
}

/* iOS-style Bordered sidebar sections */
.sidebar-section-bordered {
    border-radius: 12px;
    padding: 0;
    margin: 0 12px 16px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid #48484a;
    overflow: hidden;
}
[data-theme="light"] .sidebar-section-bordered {
    background: #fdfcfc;
    border: 1px solid #aeaeb2;
    border-radius: 12px;
    box-shadow: none;
}
.sidebar-section-bordered .sidebar-nav {
    margin: 0;
    padding: 0;
}
.sidebar-section.sidebar-section-bordered {
    padding: 0 !important;
    margin: 0 12px 16px 12px !important;
    border: 1px solid #48484a !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    overflow: hidden;
}
[data-theme="light"] .sidebar-section.sidebar-section-bordered {
    border: 1px solid #aeaeb2 !important;
    background: #fdfcfc !important;
    box-shadow: none !important;
}
@media (prefers-color-scheme: light) {
    .sidebar-section.sidebar-section-bordered {
        border: 1px solid #aeaeb2 !important;
        background: #fdfcfc !important;
    }
}
.sidebar-section-bordered .sidebar-section-header {
    padding: 14px 16px 8px 16px;
    margin-bottom: 0;
}
.sidebar-section-bordered .sidebar-section-header span {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}
[data-theme="light"] .sidebar-section-bordered .sidebar-section-header span {
    color: rgba(60, 60, 67, 0.6);
}

/* Admin Menu section */
.sidebar-section-bordered:has(.sidebar-admin-nav) {
    border: 2px solid #dc2626;
}
[data-theme="light"] .sidebar-section-bordered:has(.sidebar-admin-nav) {
    background: #fdfcfc;
    border: 2px solid #dc2626;
    box-shadow: none;
}
[data-theme="light"] .sidebar-section-bordered:has(.sidebar-admin-nav) .sidebar-section-header span {
    color: rgba(60, 60, 67, 0.6);
    font-weight: 600;
}

.sidebar-section-bordered .sidebar-categories {
    padding: 0 0 4px 0;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}
.sidebar-section-bordered .sidebar-category-link {
    padding: 3px 8px;
    font-size: 12px;
}

/* iOS-style Sidebar Links */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: background 0.15s ease;
    margin-bottom: 0;
    position: relative;
    border: none;
    background: transparent;
    box-sizing: border-box;
    max-width: 100%;
}

/* iOS-style separator between links */
.sidebar-link:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 48px;
    right: 16px;
    height: 0.5px;
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .sidebar-link {
    color: #2c2c2e;
    border: none;
    background: transparent;
    box-shadow: none;
}

[data-theme="light"] .sidebar-link:not(:last-child)::after {
    background: rgba(60, 60, 67, 0.12);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

[data-theme="light"] .sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: transparent;
    box-shadow: none;
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .sidebar-link.active {
    background: rgba(0, 0, 0, 0.06);
    border-color: transparent;
    color: #1f1f1f;
    box-shadow: none;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-link span { flex: 1; }

.sidebar-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 3px 8px;
    border-radius: 20px;
}

.sidebar-link.active .sidebar-badge {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
}

/* Sidebar Sections */
.sidebar-section {
    padding: 8px 12px;
    margin-bottom: 8px;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    margin-bottom: 4px;
}

.sidebar-section-header span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.sidebar-section-header a {
    font-size: 11px;
    color: var(--primary-light);
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-section-header a:hover {
    color: var(--primary);
}

/* New Chat Button */
.new-chat-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.new-chat-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Chat History */
.sidebar-chat-history {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 380px;
    overflow-y: auto;
}
.sidebar-chat-history::-webkit-scrollbar {
    width: 1px;
}
.sidebar-chat-history::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-chat-history::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
.sidebar-chat-history::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.chat-history-empty {
    padding: 16px 12px;
    text-align: center;
}

.chat-history-empty p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.chat-history-empty span {
    font-size: 11px;
    color: var(--text-muted);
}

.chat-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: var(--transition);
    cursor: pointer;
}

.chat-history-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.chat-history-item.active {
    background: var(--primary-glow);
    color: var(--primary-light);
}

.chat-history-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.6;
}

.chat-history-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sidebar Categories */
.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 12px;
    transition: var(--transition);
}

.sidebar-category-link:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    transform: translateX(4px);
}

.cat-icon { display: none; }
.cat-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count {
    font-size: 13px;
    color: #fff;
    background: none;
    padding: 0;
}

/* Sidebar Trending */
.sidebar-trending {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition);
}

.trending-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    transform: translateX(4px);
}

.trending-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.trending-logo img { width: 100%; height: 100%; object-fit: cover; }
.trending-logo span {
    font-size: 11px;
    font-weight: 600;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.trending-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-user:hover { background: var(--bg-elevated); }

.user-avatar {
    width: 38px;
    height: 38px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-plan {
    display: block;
    font-size: 11px;
    color: var(--text-primary);
}

.user-logout {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border-radius: 8px;
    transition: var(--transition);
}

.user-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.user-logout svg { width: 18px; height: 18px; }

.sidebar-auth {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-spacer { flex: 1; min-height: 20px; }

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    margin-left: 290px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition-slow);
    padding-bottom: 0;
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* Embed mode - for iframe in studio */
body.embed-mode .main-content {
    margin-left: 0;
    padding: 0;
    min-height: unset;
    background: #2c2c2e;
}
[data-theme="light"] body.embed-mode .main-content {
    background: #fdfcfc;
}

/* Studio page - remove padding and fix height */
.main-content:has(.studio-container) {
    padding: 0;
    background: #2c2c2e;
    min-height: auto;
    height: calc(100vh - 60px);
}
[data-theme="light"] .main-content:has(.studio-container) {
    background: #fdfcfc;
}

.sidebar.collapsed + .mobile-header + .main-content,
.sidebar.collapsed ~ .main-content {
    margin-left: 72px;
}

.main-content .container {
    max-width: 1300px;
    padding: 0 48px;
    margin: 0 auto;
}

/* Hide old header */
.header { display: none; }

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: 60px 0 50px;
    text-align: center;
    position: relative;
}

/* Animated hero background orb - DISABLED */
.hero::before {
    display: none;
}

@keyframes hero-glow {
    0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.hero h1 {
    font-size: 52px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -2px;
    position: relative;
}

.hero h1 span {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 32px;
    line-height: 1.7;
    position: relative;
}

/* Search Box */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.search-box::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient-border);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition);
}

.search-box:focus-within::before {
    opacity: 1;
}

.search-box:focus-within {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
}

.search-box input {
    flex: 1;
    padding: 20px 24px;
    font-size: 16px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
}

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

.search-box button {
    padding: 20px 32px;
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 48px;
    position: relative;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* ============================================
   AI CHAT SECTION
   ============================================ */

.ai-chat-section {
    padding: 32px 0 48px;
}

.ai-chat-widget {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.ai-chat-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 15px;
}

.ai-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.ai-model-selector select {
    padding: 10px 36px 10px 14px;
    font-size: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2371717a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    transition: var(--transition);
}

.ai-model-selector select:hover {
    border-color: var(--border-light);
}

.ai-model-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.ai-chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-message {
    display: flex;
    gap: 12px;
    animation: message-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes message-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-message.user { flex-direction: row-reverse; }

.ai-message .message-content {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.7;
}

.ai-message.bot .message-content {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.ai-message.user .message-content {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.ai-message.loading .message-content {
    display: flex;
    gap: 6px;
    padding: 18px 20px;
}

.ai-message.loading .message-content span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.ai-message.loading .message-content span:nth-child(1) { animation-delay: -0.32s; }
.ai-message.loading .message-content span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.ai-chat-input {
    display: flex;
    gap: 12px;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border);
}

.ai-chat-input input {
    flex: 1;
    padding: 14px 18px;
    font-size: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.ai-chat-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.ai-chat-input input::placeholder { color: var(--text-muted); }

.ai-chat-input button {
    padding: 14px 28px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.ai-chat-input button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.ai-chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   TOOLS SHOWCASE (POE-STYLE)
   ============================================ */

.tools-showcase {
    padding: 32px 0 64px;
    background: transparent;
}

.tool-row {
    margin-bottom: 48px;
}

.tool-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-row-header h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-row-header a {
    font-size: 14px;
    color: var(--primary-light);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.tool-row-header a:hover {
    color: var(--primary);
    gap: 8px;
}

.tool-row-header a::after {
    content: '→';
    transition: var(--transition);
}

/* Tool Icons Scroll */
.tool-icons-scroll {
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tool-icons-scroll::-webkit-scrollbar { display: none; }

.tool-icons {
    display: flex;
    gap: 22px;
    padding: 12px 0;
}

.tool-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition);
    min-width: 85px;
}

.tool-icon-item:hover {
    transform: translateY(-6px);
}

.tool-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.tool-icon-item:hover .tool-icon-circle {
    transform: scale(1.05);
}

.tool-icon-circle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.tool-icon-item:hover .tool-icon-circle::before {
    opacity: 0.1;
}

.tool-icon-circle img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 15px;
}

.tool-icon-fallback {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon-name {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: var(--transition);
}

.tool-icon-item:hover .tool-icon-name {
    color: var(--text-primary);
}

/* Categories Icons Grid */
.categories-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 20px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.category-icon-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.category-icon-item:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.category-icon-item:hover::before {
    opacity: 0.08;
}

.category-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.category-icon-item:hover .category-icon-circle {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.category-icon-circle span {
    font-size: 28px;
    line-height: 1;
}

.category-icon-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    position: relative;
    z-index: 1;
}

.category-icon-count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    position: relative;
    z-index: 1;
}

/* ============================================
   TOOLS GRID (CATALOG)
   ============================================ */

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

.tool-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 28px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.tool-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.tool-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.tool-card:hover .tool-logo {
    border-color: rgba(0,0,0,0.15);
}

.tool-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tool-logo span {
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-info {
    flex: 1;
    min-width: 0;
}

.tool-info h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--warning);
    font-weight: 600;
}

.tool-rating::before {
    content: "★";
    font-size: 14px;
}

.tool-pricing {
    font-size: 11px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    color: #999;
    border: 1px solid rgba(0,0,0,0.1);
}

[data-theme="dark"] .tool-pricing {
    color: #777;
    border-color: rgba(255,255,255,0.12);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-featured {
    background: var(--gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* ============================================
   SECTION STYLES
   ============================================ */

.section {
    padding: 48px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ============================================
   FILTERS
   ============================================ */

.filters {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.filter-btn.active {
    background: var(--primary-glow);
    color: var(--primary-light);
    border-color: var(--primary);
}

select.filter-btn {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2371717a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 18px;
}

/* ============================================
   TOOL DETAIL PAGE
   ============================================ */

.tool-detail {
    padding: 48px 0;
}

.tool-detail-header {
    display: flex;
    gap: 40px;
    margin-bottom: 48px;
    padding: 48px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.tool-detail-header::before,
.tool-detail-header::after {
    display: none;
}

.tool-detail-logo {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.tool-detail-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tool-detail-logo span {
    font-size: 40px;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-detail-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.tool-detail-info h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    letter-spacing: -1px;
}

.tool-detail-info > p {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 600px;
    line-height: 1.8;
}

.tool-actions {
    display: flex;
    gap: 14px;
}

.tool-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
}

.tool-description {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 36px;
}

.tool-description h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 28px;
}

.sidebar-card h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

/* Features List */
.features-list {
    list-style: none;
}

.features-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
}

.features-list li:last-child { border-bottom: none; padding-bottom: 0; }
.features-list li:first-child { padding-top: 0; }

.features-list li strong {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-primary);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
}

.pagination a {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.pagination a.active {
    background: var(--gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur-strong);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
}

.auth-card h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card > p {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 36px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 120px; }

.form-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-footer a {
    color: var(--primary-light);
    font-weight: 500;
    transition: var(--transition);
}

.form-footer a:hover { color: var(--primary); }

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard {
    padding: 48px 0;
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.dashboard-header p { color: var(--text-secondary); }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 28px;
    transition: var(--transition);
}

.dashboard-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.dashboard-card h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.dashboard-card .value {
    font-size: 38px;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   PRICING
   ============================================ */

.pricing {
    padding: 80px 0;
}

.pricing-header {
    text-align: center;
    margin-bottom: 64px;
}

.pricing-header h1,
.pricing-header h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.pricing-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1300px;
    margin: 0 auto;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.15);
}

.pricing-card.featured::before {
    content: 'Popular';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.pricing-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.pricing-card .price {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -2px;
}

.pricing-card .price span {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-card .description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 36px;
    flex: 1;
}

.pricing-features li {
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pricing-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
    font-size: 14px;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 24px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================
   ADMIN TABLE
   ============================================ */

.admin-table {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 16px 24px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 18px 24px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 80px 24px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 16px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    display: none !important;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.footer-copy {
    font-size: 14px;
    color: var(--text-muted);
}

.main-content .footer {
    margin-top: auto;
    background: transparent;
    padding: 24px;
}

.main-content .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Site footer - outside app-layout for full width */
.site-footer {
    display: none !important;
}

.site-footer .footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Light theme footer override - must come after .site-footer */
[data-theme="light"] .site-footer {
    background: #f1f5f9 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .site-footer .footer-copy {
    color: #64748b !important;
}

[data-theme="light"] .site-footer .footer-links a {
    color: #475569 !important;
}

/* ============================================
   UPGRADE BANNER
   ============================================ */

.upgrade-banner {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: var(--radius-xl);
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.upgrade-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
}

.upgrade-banner h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.upgrade-banner p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============================================
   MOBILE HEADER
   ============================================ */

.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 90;
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
    }
}

.mobile-menu-btn svg { width: 22px; height: 22px; }

.mobile-logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
}

.mobile-header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.mobile-avatar {
    width: 38px;
    height: 38px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

/* Sidebar Overlay - DISABLED */
.sidebar-overlay,
.sidebar-overlay.active {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ============================================
   CHAT CONTAINER (FIXED BOTTOM)
   ============================================ */

.chat-container {
    position: fixed !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: var(--blur-strong);
    padding: 20px 48px 24px;
    z-index: 9999;
    transition: left 0.3s ease;
    border-top: none;
}

.chat-container.sidebar-collapsed { left: 0; }

/* Light theme for chat container and footer */
[data-theme="light"] .chat-container {
    background: #f1f5f9;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .chat-input-wrapper {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
}

.chat-container svg,
.chat-messages svg,
.chat-welcome svg {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.chat-messages {
    max-width: 800px;
    margin: 0 auto 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.chat-messages.expanded {
    max-height: 400px;
    overflow-y: auto;
}

.chat-welcome {
    text-align: center;
    padding: 32px 20px;
}

.chat-welcome-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    max-width: 56px;
    max-height: 56px;
    background: var(--gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.chat-welcome-icon svg {
    width: 28px !important;
    height: 28px !important;
    color: white;
}

.chat-welcome h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.chat-welcome p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 20px;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.chat-suggestion {
    padding: 11px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.chat-suggestion:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    background: var(--primary-glow);
    transform: translateY(-2px);
}

.chat-input-container {
    max-width: 800px;
    margin: 0 auto;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-lg);
    padding: 8px 12px;
    transition: var(--transition);
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 0 30px rgba(139, 92, 246, 0.1);
}

.chat-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.chat-btn svg { width: 20px; height: 20px; }

.chat-btn.chat-send {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.chat-btn.chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.chat-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    padding: 10px 14px;
    outline: none;
    min-width: 0;
}

.chat-input-wrapper input::placeholder { color: var(--text-muted); }

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: message-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-message.user { flex-direction: row-reverse; }

.chat-message-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.chat-message-avatar svg {
    width: 18px !important;
    height: 18px !important;
    color: white;
}

.chat-message-avatar.user-avatar {
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

.chat-message-content {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.7;
}

.chat-message.assistant .chat-message-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.chat-message.user .chat-message-content {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.chat-loading {
    display: flex;
    gap: 6px;
    padding: 8px 0;
}

.chat-loading span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.chat-loading span:nth-child(1) { animation-delay: -0.32s; }
.chat-loading span:nth-child(2) { animation-delay: -0.16s; }

/* Tool Chat Widget */
.tool-chat-widget {
    margin-top: 32px;
}

.tool-chat-widget h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.tool-chat-widget .ai-chat-widget { max-width: 100%; }
.tool-chat-widget .ai-chat-messages { height: 220px; }

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar { width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; }

::selection { background: rgba(209, 213, 219, 0.5); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
    }

    .sidebar.open { transform: translateX(0); }

    .main-content {
        margin-left: 0;
    }

    .sidebar.collapsed + .mobile-header + .main-content,
    .sidebar.collapsed ~ .main-content {
        margin-left: 0;
    }

    .top-header.inner-page .header-center {
        transform: none;
    }

    .top-header.inner-page .header-right {
        margin-right: 0;
    }

    .top-header.with-sidebar {
        padding-left: 0;
    }

    .site-footer.with-sidebar {
        padding-left: 0;
    }

    .mobile-header { display: flex; }
    .sidebar-toggle { display: none; }

    .tool-content { grid-template-columns: 1fr; }
    .tool-sidebar { order: -1; }

    .chat-container,
    .chat-container.sidebar-collapsed {
        left: 0;
        padding: 16px;
    }

    .categories-icons { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 320px;
    }

    .app-layout {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .main-content {
        flex: 1;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .main-content .container { padding: 0 20px; }

    .hero h1 {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .hero p { font-size: 16px; }

    .stats {
        gap: 40px;
        flex-wrap: wrap;
    }

    .stat-value { font-size: 34px; }

    .tool-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 32px;
    }

    .tool-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

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

    .footer-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .categories-icons { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .tool-icons-scroll { margin: 0 -20px; padding: 0 20px; }
    .tool-icons { gap: 20px; }
    .tool-icon-circle { width: 64px; height: 64px; }
    .tool-icon-circle img { width: 64px; height: 64px; }

    .ai-chat-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .ai-model-selector { width: 100%; }
    .ai-model-selector select { width: 100%; }

    .ai-chat-input { flex-direction: column; }
    .ai-chat-input button { width: 100%; }

    .chat-suggestions { flex-direction: column; }
    .chat-suggestion { width: 100%; }
    .chat-btn:not(.chat-send) { display: none; }
    .chat-input-wrapper { padding: 6px 10px; }

    /* Mobile sidebar - hidden by default, shown when open */
    .sidebar {
        display: flex;
        transform: translateX(-100%);
        visibility: hidden;
        width: 85%;
        max-width: 300px;
        background: #0a0a0a !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.9);
    }

    .sidebar.open {
        transform: translateX(0);
        visibility: visible;
    }
}

/* ============================================
   FLOATING PARTICLES (optional, enable with JS)
   ============================================ */

.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.3;
    animation: particle-float 20s linear infinite;
}

@keyframes particle-float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ============================================
   SKELETON LOADING
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
}

/* ============================================
   TOP HEADER - PREMIUM NAVIGATION
   ============================================ */

.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    min-height: 64px;
    z-index: 10000;
    background: var(--bg-dark);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    overflow: visible;
}

.top-header.scrolled {
    background: var(--bg-dark);
    box-shadow: none;
}

.top-header.with-sidebar {
    padding-left: 290px;
}

.site-footer.with-sidebar {
    padding-left: 290px;
}

.header-inner {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    gap: 24px;
}

.top-header:not(.inner-page) .header-inner {
    max-width: 100%;
    padding: 0 40px;
    gap: clamp(12px, 2.5vw, 36px);
}

.top-header:not(.inner-page) .header-nav {
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.top-header:not(.inner-page) .header-right {
    flex-shrink: 0;
}

.top-header:not(.inner-page) .btn-ghost {
    white-space: nowrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 36px !important;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    min-height: 42px;
    flex-shrink: 0;
    white-space: nowrap;
}

.header-logo-img {
    display: none;
}

.logo-icon-header {
    display: none;
}

.logo-icon-header svg {
    width: 18px;
    height: 18px;
}

.logo-text-header .gradient-text {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #06b6d4;
    background-clip: unset;
    color: #06b6d4;
}
[data-theme="light"] .logo-text-header .gradient-text {
    -webkit-text-fill-color: #0b7f94;
    color: #0b7f94;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: clamp(0px, 0.5vw, 8px);
}

.header-nav-link {
    padding: 8px clamp(6px, 1vw, 16px);
    font-size: clamp(16px, 1.2vw, 18px);
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.header-nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.header-nav-link.active {
    color: var(--text-primary);
    background: transparent;
}

.header-center {
    flex: 1;
    max-width: 420px;
    margin: 0 auto;
}

.top-header.inner-page .header-center {
    transform: translateX(90px);
}

.top-header.inner-page .header-right {
    margin-right: 0;
}

.top-header.inner-page .header-left {
    padding-left: 290px;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.header-search:focus-within {
    border-color: rgba(0,0,0,0.25);
    box-shadow: none;
}
[data-theme="dark"] .header-search:focus-within {
    border-color: rgba(255,255,255,0.3);
}

.header-search svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.header-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search kbd {
    padding: 4px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 11px;
    font-family: inherit;
    color: var(--text-muted);
}

/* Header search - inline dropdown */
.hsd {
    display: none;
    position: fixed;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
    max-height: 380px;
    overflow-y: auto;
    z-index: 2147483647;
    padding: 6px;
}
[data-theme="dark"] .hsd {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08);
}
.hsd-loading {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.hsd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.12s;
}
.hsd-item:hover, .hsd-item.hsd-active {
    background: var(--bg-hover, rgba(0,0,0,0.04));
}
[data-theme="dark"] .hsd-item:hover,
[data-theme="dark"] .hsd-item.hsd-active {
    background: rgba(255,255,255,0.06);
}
.hsd-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hsd-icon svg, .hsd-icon i { width: 18px; height: 18px; color: var(--text-muted); }
.hsd-info { flex: 1; min-width: 0; }
.hsd-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hsd-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.hsd-cat {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 50px;
    flex-shrink: 0;
    text-transform: capitalize;
}
.hsd-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.header-icon-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

[data-theme="light"] .header-icon-btn:hover {
    background: rgba(0,0,0,0.06);
}

.header-icon-btn svg {
    width: 20px;
    height: 20px;
}

.header-text-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

.header-text-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

[data-theme="light"] .header-text-btn:hover {
    background: rgba(0,0,0,0.06);
}

.header-text-btn svg {
    flex-shrink: 0;
}

.header-user-menu {
    position: relative;
}

.header-avatar {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 500;
    font-size: 17px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.header-avatar .avatar-letter {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
}

.header-avatar .avatar-name {
    white-space: nowrap;
}

.header-avatar:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

[data-theme="light"] .header-avatar {
    color: #18181b;
    border-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .header-avatar:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .header-avatar .avatar-letter {
    background: rgba(0, 0, 0, 0.08);
}

.header-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #1a1a1f;
    z-index: 99999;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 9999;
}

/* ── User dropdown: ALWAYS dark ── */
#headerDropdown {
    background: #1a1a1f !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
}
#headerDropdown .dropdown-name { color: #fafafa !important; }
#headerDropdown .dropdown-email { color: #a1a1aa !important; }
#headerDropdown .dropdown-item { color: #a1a1aa !important; }
#headerDropdown .dropdown-item:hover { background: rgba(255,255,255,0.06) !important; color: #fafafa !important; }
#headerDropdown .dropdown-item svg { stroke: #a1a1aa !important; }
#headerDropdown .dropdown-item:hover svg { stroke: #fafafa !important; }
#headerDropdown .dropdown-divider { background: rgba(255,255,255,0.1) !important; }
#headerDropdown .dropdown-item-danger:hover { color: #ef4444 !important; }
#headerDropdown .dropdown-item-danger:hover svg { stroke: #ef4444 !important; }

.header-dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}
.header-user-menu:hover .header-dropdown,
.header-dropdown:hover,
.header-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.dropdown-name {
    display: block;
    font-weight: 600;
    color: #18181b;
    margin-bottom: 2px;
}

.dropdown-email {
    font-size: 12px;
    color: #71717a;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #52525b;
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
}

.dropdown-item:hover {
    background: rgba(0,0,0,0.04);
    color: #18181b;
}

[data-theme="dark"] .dropdown-name { color: #fafafa; }
[data-theme="dark"] .dropdown-email { color: #a1a1aa; }
[data-theme="dark"] .dropdown-divider { background: rgba(255,255,255,0.1); }
[data-theme="dark"] .dropdown-item { color: #a1a1aa; }
[data-theme="dark"] .dropdown-item:hover { background: rgba(255,255,255,0.06); color: #fafafa; }

.dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.btn-glow {
    box-shadow: 0 0 20px var(--primary-glow), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-glow:hover {
    box-shadow: 0 0 30px var(--primary-glow), 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Adjust body padding for fixed header */
body {
    padding-top: 64px;
}

/* ============================================
   PREMIUM HERO SECTION
   ============================================ */

.hero-premium {
    position: relative;
    padding: 80px 0 40px;
    overflow: visible;
    background: var(--bg-dark);
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-bg-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(139, 92, 246, 0.8);
    border-radius: 50%;
    box-shadow:
        0 0 15px rgba(139, 92, 246, 0.9),
        0 0 30px rgba(139, 92, 246, 0.5);
    animation: particleFloat 15s ease-in-out infinite;
}

.hero-orb-1 {
    top: 30%;
    left: 25%;
    animation-delay: 0s;
    background: rgba(139, 92, 246, 0.8);
    box-shadow:
        0 0 15px rgba(139, 92, 246, 0.9),
        0 0 30px rgba(139, 92, 246, 0.5);
}

.hero-orb-2 {
    top: 50%;
    right: 30%;
    animation-delay: -5s;
    background: rgba(6, 182, 212, 0.8);
    box-shadow:
        0 0 15px rgba(6, 182, 212, 0.9),
        0 0 30px rgba(6, 182, 212, 0.5);
}

.hero-orb-3 {
    bottom: 35%;
    left: 40%;
    animation-delay: -10s;
    background: rgba(236, 72, 153, 0.7);
    box-shadow:
        0 0 15px rgba(236, 72, 153, 0.9),
        0 0 30px rgba(236, 72, 153, 0.5);
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.7;
    }
    25% {
        transform: translate(80px, -60px);
        opacity: 1;
    }
    50% {
        transform: translate(150px, 30px);
        opacity: 0.6;
    }
    75% {
        transform: translate(60px, 80px);
        opacity: 0.95;
    }
}

.hero-grid {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 600' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3Cstyle%3E .wire %7B fill: none; stroke-width: 1; opacity: 0.5; %7D %3C/style%3E%3C/defs%3E%3Cg%3E%3C!-- Horizontal lines --%3E%3Cpath class='wire' stroke='%238b5cf6' d='M0,100 L480,150 L960,100 L1440,150 L1920,100'/%3E%3Cpath class='wire' stroke='%2306b6d4' d='M0,250 L480,200 L960,250 L1440,200 L1920,250'/%3E%3Cpath class='wire' stroke='%23ec4899' d='M0,400 L480,450 L960,400 L1440,450 L1920,400'/%3E%3Cpath class='wire' stroke='%238b5cf6' d='M0,550 L480,500 L960,550 L1440,500 L1920,550'/%3E%3C!-- Vertical connections --%3E%3Cpath class='wire' stroke='%2306b6d4' d='M480,150 L480,500'/%3E%3Cpath class='wire' stroke='%23ec4899' d='M960,100 L960,550'/%3E%3Cpath class='wire' stroke='%238b5cf6' d='M1440,150 L1440,500'/%3E%3C!-- Diagonal cross connections --%3E%3Cpath class='wire' stroke='%2306b6d4' d='M0,100 L480,250 M480,250 L960,400'/%3E%3Cpath class='wire' stroke='%23ec4899' d='M960,100 L1440,250 M1440,250 L1920,400'/%3E%3Cpath class='wire' stroke='%238b5cf6' d='M480,150 L960,250 M960,250 L1440,150'/%3E%3C!-- Additional grid --%3E%3Cpath class='wire' stroke='%238b5cf6' d='M240,175 L720,225 L1200,175 L1680,225'/%3E%3Cpath class='wire' stroke='%2306b6d4' d='M240,325 L720,375 L1200,325 L1680,375'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Animated Particles following wireframe paths */
.hero-grid::before,
.hero-grid::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(139, 92, 246, 0.9);
    border-radius: 50%;
    box-shadow:
        0 0 15px rgba(139, 92, 246, 1),
        0 0 30px rgba(139, 92, 246, 0.7);
    animation: particleFloat1 15s linear infinite;
}

.hero-grid::before {
    top: calc(100px / 6);
    left: 0%;
}

.hero-grid::after {
    top: calc(250px / 6);
    left: 0%;
    animation: particleFloat2 12s linear infinite;
    background: rgba(6, 182, 212, 0.9);
    box-shadow:
        0 0 15px rgba(6, 182, 212, 1),
        0 0 30px rgba(6, 182, 212, 0.7);
}

/* Additional particles using pseudo elements on hero-orbs */
.hero-orb-1::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(236, 72, 153, 0.9);
    border-radius: 50%;
    box-shadow:
        0 0 15px rgba(236, 72, 153, 1),
        0 0 30px rgba(236, 72, 153, 0.7);
    animation: particleFloat3 18s linear infinite;
    top: calc(400px / 6);
    left: 0%;
}

.hero-orb-2::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(139, 92, 246, 0.9);
    border-radius: 50%;
    box-shadow:
        0 0 15px rgba(139, 92, 246, 1),
        0 0 30px rgba(139, 92, 246, 0.7);
    animation: particleFloat4 14s linear infinite;
    top: calc(550px / 6);
    left: 100%;
}

/* Particle 1: Line 1 (purple) - y=100 to 150 to 100 to 150 to 100 */
@keyframes particleFloat1 {
    0% {
        transform: translate(0vw, 0px);
        opacity: 0;
    }
    3% {
        opacity: 1;
    }
    25% {
        transform: translate(25vw, 8.33px);
        opacity: 1;
    }
    50% {
        transform: translate(50vw, 0px);
        opacity: 1;
    }
    75% {
        transform: translate(75vw, 8.33px);
        opacity: 1;
    }
    97% {
        opacity: 1;
    }
    100% {
        transform: translate(100vw, 0px);
        opacity: 0;
    }
}

/* Particle 2: Line 2 (cyan) - y=250 to 200 to 250 to 200 to 250 */
@keyframes particleFloat2 {
    0% {
        transform: translate(0vw, 0px);
        opacity: 0;
    }
    3% {
        opacity: 1;
    }
    25% {
        transform: translate(25vw, -8.33px);
        opacity: 1;
    }
    50% {
        transform: translate(50vw, 0px);
        opacity: 1;
    }
    75% {
        transform: translate(75vw, -8.33px);
        opacity: 1;
    }
    97% {
        opacity: 1;
    }
    100% {
        transform: translate(100vw, 0px);
        opacity: 0;
    }
}

/* Particle 3: Line 3 (pink) - y=400 to 450 to 400 to 450 to 400 */
@keyframes particleFloat3 {
    0% {
        transform: translate(0vw, 0px);
        opacity: 0;
    }
    3% {
        opacity: 1;
    }
    25% {
        transform: translate(25vw, 8.33px);
        opacity: 1;
    }
    50% {
        transform: translate(50vw, 0px);
        opacity: 1;
    }
    75% {
        transform: translate(75vw, 8.33px);
        opacity: 1;
    }
    97% {
        opacity: 1;
    }
    100% {
        transform: translate(100vw, 0px);
        opacity: 0;
    }
}

/* Particle 4: Line 4 (purple) - y=550 to 500 to 550 to 500 to 550 (REVERSED) */
@keyframes particleFloat4 {
    0% {
        transform: translate(0vw, 0px);
        opacity: 0;
    }
    3% {
        opacity: 1;
    }
    25% {
        transform: translate(-25vw, -8.33px);
        opacity: 1;
    }
    50% {
        transform: translate(-50vw, 0px);
        opacity: 1;
    }
    75% {
        transform: translate(-75vw, -8.33px);
        opacity: 1;
    }
    97% {
        opacity: 1;
    }
    100% {
        transform: translate(-100vw, 0px);
        opacity: 0;
    }
}

.hero-premium .container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 100%;
    width: 100%;
    padding: 0 24px;
    margin: 0 auto;
}

/* Announcement Badge */
.hero-announcement {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px 8px 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.hero-announcement:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.announcement-badge {
    padding: 4px 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.announcement-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.announcement-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Hero Title */
.hero-title {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 16px;
}

.hero-title-line {
    display: block;
    color: var(--text-primary);
}

.hero-title-gradient {
    display: block;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: 17px;
    color: #fff;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto 28px;
}

.hero-subtitle strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Hero Search Box */
.hero-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto 32px;
    padding: 14px 16px;
    background: rgba(30, 30, 40, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-search-box:focus-within {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.search-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.4);
}

.search-icon-wrap svg {
    width: 22px;
    height: 22px;
}

.hero-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 17px;
    line-height: 1.5;
    color: var(--text-primary);
    padding: 12px 0;
}

.hero-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.hero-search-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #667eea;
    border: none;
    border-radius: 18px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.hero-search-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.hero-search-btn svg {
    width: 16px;
    height: 16px;
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-stat-card {
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.hero-stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.hero-stat-card .stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.hero-stat-card .stat-label {
    display: block;
    font-size: 12px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Floating Badges - Hidden to avoid text overlap */
.hero-floating-badges {
    display: none;
}

/* ============================================
   TRUSTED BY SECTION
   ============================================ */

.trusted-by {
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.trusted-by .container {
    max-width: 1400px;
}

.trusted-label {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.trusted-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.trusted-logo {
    color: rgba(255,255,255,0.9);
    opacity: 1;
    transition: var(--transition);
}

.trusted-logo:hover {
    opacity: 1;
    color: white;
}

.trusted-logo svg {
    width: 32px;
    height: 32px;
}

.trusted-logo-link {
    text-decoration: none;
    transition: var(--transition);
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
}

.trusted-logo-link:hover {
    border-color: var(--primary);
}

.trusted-logo-link:hover .ai-company-logo {
    color: var(--primary);
    opacity: 1;
}

.ai-company-logo {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    opacity: 1;
    transition: var(--transition);
    white-space: nowrap;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-section {
    padding: 80px 0;
    background: #142749;
}

.features-section .container {
    max-width: 1400px;
}

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

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

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: var(--gradient-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--primary);
}

.feature-icon svg {
    width: 26px;
    height: 26px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE - NEW ELEMENTS
   ============================================ */

@media (max-width: 1400px) {
    .app-layout.homepage-layout .tools-showcase {
        max-width: 100%;
        padding: 0 24px;
    }

    .container,
    .main-content .container {
        padding: 0 24px;
    }

    .top-header:not(.inner-page) .header-inner {
        padding: 0 24px;
    }
}

@media (max-width: 1200px) {
    .app-layout.homepage-layout .tools-showcase .homepage-sidebar {
        width: 220px;
        min-width: 220px;
    }

    .container,
    .main-content .container {
        padding: 0 20px;
    }

    .top-header:not(.inner-page) .header-inner {
        padding: 0 20px;
    }

    .top-header:not(.inner-page) .header-nav-link {
        padding: 6px 4px;
        font-size: 13px;
    }
}

@media (max-width: 1024px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .floating-badge {
        display: none;
    }

    .header-nav {
        display: none;
    }

    .app-layout.homepage-layout .tools-showcase {
        flex-direction: column;
    }

    .app-layout.homepage-layout .tools-showcase .homepage-sidebar {
        width: 100%;
        min-width: 100%;
        position: static;
        padding: 16px 0;
        border-right: none;
    }
}

@media (max-width: 768px) {
    .top-header {
        height: 56px;
    }

    .top-header.with-sidebar {
        padding-left: 0;
    }

    .site-footer.with-sidebar {
        padding-left: 0;
    }

    body {
        padding-top: 56px;
    }

    .header-center {
        display: none;
    }

    .header-inner {
        padding: 0 16px;
    }

    .top-header:not(.inner-page) .header-inner {
        padding: 0 16px;
    }

    .hero-premium {
        padding: 40px 0 30px;
        min-height: auto;
        overflow: visible;
    }

    .hero-title {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-chat-input-box {
        padding: 12px 14px;
        gap: 6px;
    }

    .chat-icon-btn {
        width: 30px;
        height: 30px;
    }

    .chat-icon-btn svg {
        width: 16px;
        height: 16px;
    }

    .chat-textarea {
        font-size: 14px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero-stat-card {
        padding: 16px;
    }

    .hero-stat-card .stat-number {
        font-size: 20px;
    }

    .trusted-logos {
        gap: 32px;
    }

    .trusted-logo svg {
        width: 24px;
        height: 24px;
    }

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

    .feature-card {
        padding: 24px;
    }

    /* Make hero background elements visible on mobile */
    .hero-bg-elements {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .hero-orb {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 8px !important;
        height: 8px !important;
    }

    .hero-orb-1,
    .hero-orb-2,
    .hero-orb-3 {
        width: 8px !important;
        height: 8px !important;
    }

    .hero-grid {
        display: block !important;
        visibility: visible !important;
        opacity: 0.4 !important;
    }

    .hero-grid::before,
    .hero-grid::after {
        width: 8px !important;
        height: 8px !important;
    }
}

@media (max-width: 480px) {
    .hero-announcement {
        padding: 6px 12px 6px 6px;
        gap: 8px;
    }

    .announcement-text {
        font-size: 12px;
    }

    .hero-search-tags {
        display: none;
    }

    .trusted-by {
        padding: 16px 0;
        overflow-x: auto;
    }

    .trusted-logos {
        gap: 8px;
        justify-content: flex-start;
        padding: 0 16px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .trusted-logo-link {
        padding: 4px 8px;
        flex-shrink: 0;
    }

    .ai-company-logo {
        font-size: 11px;
        white-space: nowrap;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .hero-stat-card {
        padding: 12px 8px;
    }

    .hero-stat-card .stat-number {
        font-size: 18px;
    }

    .hero-stat-card .stat-label {
        font-size: 11px;
    }

    .hero-title {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-search-box {
        padding: 10px 12px;
        gap: 8px;
    }

    .hero-search-box input {
        font-size: 15px;
    }

    .hero-search-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .search-icon-wrap svg {
        width: 20px;
        height: 20px;
    }

    .hero-search-btn svg {
        width: 14px;
        height: 14px;
    }

    .tool-row-header h2 {
        font-size: 18px;
    }

    .tool-icon-item {
        min-width: 65px;
    }

    .tool-icon-circle {
        width: 56px;
        height: 56px;
    }

    .tool-icon-circle img {
        width: 56px;
        height: 56px;
    }

    .tool-icon-name {
        font-size: 10px;
        max-width: 60px;
    }
}

@media (max-width: 360px) {
    .hero-premium {
        padding: 30px 0 20px;
        overflow: visible;
    }

    .hero-premium .container {
        padding: 0 12px;
    }

    .hero-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .hero-chat-container {
        margin-bottom: 20px;
        padding: 0 8px;
    }

    .hero-stats {
        gap: 6px;
    }

    .hero-stat-card {
        padding: 10px 6px;
    }

    .hero-stat-card .stat-number {
        font-size: 16px;
    }

    .hero-stat-card .stat-label {
        font-size: 10px;
    }

    .tool-row {
        margin-bottom: 24px;
    }

    .tool-row-header {
        margin-bottom: 16px;
    }

    .tool-row-header h2 {
        font-size: 16px;
    }

    .tool-icon-circle {
        width: 48px;
        height: 48px;
    }

    .tool-icon-circle img {
        width: 48px;
        height: 48px;
    }

    .tool-icon-name {
        font-size: 9px;
        max-width: 50px;
    }

    .tool-icon-item {
        min-width: 55px;
    }
}

/* ============================================
   CATEGORIES PAGE
   ============================================ */

.categories-page {
    padding: 40px 0 80px;
}

.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.categories-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.category-page-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.category-page-card::before {
    display: none;
}

.category-page-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.category-card-content {
    flex: 1;
    margin-bottom: 20px;
}

.category-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: var(--transition);
}

.category-page-card:hover .category-card-title {
    color: var(--text-primary);
}

.category-card-desc {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    padding: 0;
}

.category-card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.category-card-arrow svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-primary);
    transition: var(--transition);
}

.category-page-card:hover .category-card-arrow svg {
    transform: translateX(2px);
}

/* Dark mode - category cards */
[data-theme="dark"] .category-page-card {
    background: #333335;
    border: 1px solid rgba(255,255,255,0.18);
}

[data-theme="dark"] .category-page-card:hover {
    background: #3a3a3c;
    border-color: rgba(255,255,255,0.28);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

/* Light mode - category cards with borders and shadows */
[data-theme="light"] .category-page-card {
    background: #ffffff;
    border: 1.5px solid #d2d2d7;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

[data-theme="light"] .category-page-card:hover {
    border-color: #b0b0b8;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
}

[data-theme="light"] .category-card-desc {
    color: #64748b;
}

[data-theme="light"] .category-card-count {
    background: none;
    color: #64748b;
}

@media (max-width: 768px) {
    .categories-page {
        padding: 24px 0 48px;
    }

    .page-title {
        font-size: 32px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .categories-page-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .category-page-card {
        padding: 20px;
    }

    .category-card-title {
        font-size: 18px;
    }
}

/* ============================================
   ADMIN HEADER & LAYOUT
   ============================================ */

.admin-section {
    padding: 0;
    font-size: 16px;
}

.admin-section table {
    font-size: 16px;
}

.admin-section table th {
    font-size: 14px;
}

.admin-section table td {
    font-size: 16px;
}

.admin-section .btn {
    font-size: 16px;
}

.admin-section .btn-sm {
    font-size: 14px;
}

.admin-section label {
    font-size: 16px;
}

.admin-section input,
.admin-section select,
.admin-section textarea {
    font-size: 16px;
}

.admin-section p {
    font-size: 16px;
}

.admin-section h3 {
    font-size: 20px;
}

.admin-section .admin-header-wrapper {
    position: sticky;
    top: 64px;
    z-index: 100;
    background: var(--bg-dark);
    padding: 24px 0 0 0;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.admin-section .admin-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.admin-section .admin-title-row {
    margin-bottom: 24px;
    text-align: center;
}

.admin-section .admin-main-title {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin-bottom: 4px !important;
}

.admin-section .admin-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.admin-section .admin-stats-row {
    display: flex !important;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-section .admin-stat-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    padding: 16px 24px !important;
    min-width: 140px;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px;
}

.admin-section .admin-stat-label {
    font-size: 14px !important;
    color: var(--text-secondary) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.admin-section .admin-stat-value {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    display: block;
}

.admin-section .admin-nav-row {
    display: flex !important;
    gap: 12px;
    padding-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-section .admin-nav-row::-webkit-scrollbar {
    display: none;
}

.admin-section .admin-nav-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    white-space: nowrap;
    transition: var(--transition);
    text-decoration: none !important;
    cursor: pointer;
}

.admin-section .admin-nav-btn:hover {
    color: var(--text-primary) !important;
    background: var(--bg-card-hover) !important;
    border-color: var(--border-light) !important;
}

.admin-section .admin-nav-btn.active {
    color: var(--primary) !important;
    background: var(--primary-glow) !important;
    border-color: var(--primary) !important;
}

.admin-section .admin-nav-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Force nav button styles on anchors */
.admin-section nav.admin-nav-row a.admin-nav-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.admin-section nav.admin-nav-row a.admin-nav-btn:hover {
    color: var(--text-primary) !important;
    background: var(--bg-card-hover) !important;
    border-color: var(--border-light) !important;
    transform: translateY(-1px);
}

.admin-section nav.admin-nav-row a.admin-nav-btn.active {
    color: var(--primary) !important;
    background: var(--primary-glow) !important;
    border-color: var(--primary) !important;
}

/* Admin page content container */
.admin-page-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

/* Dashboard specific - hide stats in index since header has them */
.dashboard-grid {
    display: none;
}

/* Dashboard header on index page */
.admin-section .dashboard-header {
    display: none;
}

/* Admin table improvements */
.admin-page-content .admin-table {
    margin-top: 0;
}

.admin-page-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .admin-section .admin-header-wrapper {
        top: 56px;
        padding: 16px 0 0 0;
    }

    .admin-section .admin-stats-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .admin-section .admin-stat-card {
        padding: 12px 16px !important;
        min-width: auto;
    }

    .admin-section .admin-stat-value {
        font-size: 24px !important;
    }

    .admin-section .admin-nav-row {
        gap: 8px;
    }

    .admin-section .admin-nav-btn {
        padding: 10px 14px !important;
        font-size: 15px !important;
    }

    .admin-section .admin-nav-btn svg {
        display: none;
    }
}

/* Studio gallery: hide date labels */
.project-date, [class*="-gallery-date"] { display: none !important; }
/* Video tools: 8 columns gallery */
.projects-grid, .musicvis-gallery-grid, .kv-videos-grid, .dv-videos-grid, .hv-videos-grid, .videos-grid, .tiktok-gallery-grid, .pxv-gallery-grid, .prvg-gallery-grid, .vad-gallery-grid, .vfx-gallery-grid, .gifs-grid, .ugc-gallery-grid { grid-template-columns: repeat(8, 1fr) !important; gap: 8px !important; }
/* Video tools: UGC-style uniform gallery (1:1 aspect ratio) */
.project-card, .video-card, [class*="-gallery-card"], [class*="-video-card"] { overflow: hidden !important; border-radius: 16px !important; }
.project-thumbnail, .video-thumbnail, [class*="-gallery-thumb"], [class*="-video-thumbnail"] { aspect-ratio: 1 !important; background: #111 !important; overflow: hidden !important; width: 100% !important; display: flex !important; align-items: center !important; justify-content: center !important; position: relative !important; }
.project-thumbnail video, .video-thumbnail video, [class*="-gallery-thumb"] video, [class*="-video-thumbnail"] video,
.project-thumbnail img, .video-thumbnail img, [class*="-gallery-thumb"] img, [class*="-video-thumbnail"] img { width: 100% !important; height: 100% !important; object-fit: cover !important; position: absolute !important; inset: 0 !important; }
