/* Floofs Den - Theme System (Default: Dark Purple) */
:root {
    /* Brand accents stay vibrant on both themes */
    --primary-color: #c8a6ff; /* light lavender */
    --primary-dark: #b18cff;
    --secondary-color: #9b8cff;
    --accent-color: #ffd93d;

    /* Default DARK theme tokens */
    --background-color: #0f0f23; /* deep indigo */
    --bg-gradient-start: #1a1333; /* subtle purple haze */
    --surface-color: #181832; /* cards/nav surfaces */
    --text-color: #eef0ff;
    --text-light: #b9bbd6;
    --border-color: rgba(255,255,255,0.08);
    --chip-bg: rgba(255,255,255,0.06);
    --shadow-light: 0 6px 16px rgba(0, 0, 0, 0.35);
    --shadow-medium: 0 14px 30px rgba(0, 0, 0, 0.45);
    --gradient-primary: linear-gradient(135deg, #7b5cff 0%, #c279ff 100%);
    --gradient-secondary: linear-gradient(135deg, #ffd93d 0%, #c279ff 100%);
}

/* Light theme overrides */
[data-theme="light"] {
    --primary-color: #ff9ec7;
    --primary-dark: #ff7bb3;
    --secondary-color: #b794f6;
    --accent-color: #ffd93d;
    --background-color: #fef7ff;
    --bg-gradient-start: #fef7ff;
    --surface-color: #ffffff;
    --text-color: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --chip-bg: #00000010;
    --shadow-light: 0 4px 6px rgba(255, 158, 199, 0.1);
    --shadow-medium: 0 10px 25px rgba(255, 158, 199, 0.15);
    --gradient-primary: linear-gradient(135deg, #ff9ec7 0%, #b794f6 100%);
    --gradient-secondary: linear-gradient(135deg, #ffd93d 0%, #ff9ec7 100%);
}

/* Commands Section - Card Layout & Larger Typography */
.commands-panel {
    font-size: 1.05rem;
}

.commands-panel .command-list {
    gap: 16px !important;
}

.commands-panel .command {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.commands-panel .command:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(183,148,246,0.35);
}

.commands-panel .command code {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 10px;
    user-select: text;
}

.commands-panel .command span {
    color: var(--text-light);
    font-size: 0.98rem;
    line-height: 1.6;
}

.feature-toggle {
    font-size: 1rem;
}

.section-description {
    font-size: 1.05rem;
}

/* Command Filter Toolbar */
.command-toolbar {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: max-height 0.25s ease, box-shadow 0.2s ease;
    max-height: 44px; /* collapsed height */
    margin-bottom: 12px;
}

.command-toolbar.open {
    max-height: 200px; /* expanded */
    box-shadow: var(--shadow-medium);
}

.toolbar-handle {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
}

.toolbar-grip {
    width: 36px;
    height: 6px;
    border-radius: 3px;
    background: #CBD5E0;
}

.toolbar-title {
    font-weight: 700;
    color: #2d3748;
}

.toolbar-content {
    padding: 12px 14px 14px 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.toolbar-search {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
}

.toolbar-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip { padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--surface-color); font-size: 0.9rem; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; }

.chip.active, .chip:hover {
    background: rgba(183, 148, 246, 0.12);
    border-color: rgba(183, 148, 246, 0.6);
}

/* Global Commands Filter Bar */
.global-command-filter {
    margin: 8px 0 18px 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-color);
    box-shadow: var(--shadow-light);
}

.gcf-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    flex-wrap: wrap;
}

.gcf-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gcf-title { font-weight: 800; color: #2d3748; }
.gcf-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.gcf-chip { padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--surface-color); font-size: 0.9rem; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; }
.gcf-chip.active, .gcf-chip:hover { background: rgba(183,148,246,0.12); border-color: rgba(183,148,246,0.6); }

.gcf-right input {
    width: min(380px, 90vw);
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
}

/* Legal Pages (Privacy & Terms) */
.legal-page {
    padding: 120px 0 80px;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(26,19,51,0.9) 0%, rgba(15,15,35,0.92) 100%);
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    color: var(--text-color);
}

.legal-header {
    text-align: center;
    margin-bottom: 60px;
}

.legal-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
}

.legal-content {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.legal-content h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
    font-weight: 700;
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p { line-height: 1.8; margin-bottom: 15px; color: var(--text-color); }
.legal-content ul { margin: 15px 0; padding-left: 20px; }
.legal-content li { margin-bottom: 8px; color: var(--text-color); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    text-decoration: none;
    margin-bottom: 30px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.back-link:hover { color: var(--primary-dark); transform: translateY(-2px); }

.last-updated {
    text-align: center;
    margin-top: 40px;
    color: var(--text-light);
    font-style: italic;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, rgba(26, 19, 51, 0.9) 0%, rgba(15, 15, 35, 0.95) 100%), url('https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExaGx2dGJmZXVqbWl6dGNvdGNhbWZjZXNlbzBzaHNlNzNmbGVxZGNrZCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/JIX9t2j0ZTN9S/giphy.gif');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-logo {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(255, 158, 199, 0.3));
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Theme toggle button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
    box-shadow: var(--shadow-light);
}
.theme-toggle:hover { transform: translateY(-2px); border-color: rgba(183,148,246,0.6); }
.theme-toggle:active { transform: translateY(0); }

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.support-link {
    color: var(--secondary-color) !important;
    font-weight: 600;
}

.support-link:hover {
    color: var(--primary-color) !important;
}

.login-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Hero Section */
.hero {
    min-height: 110vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, rgba(26, 19, 51, 0.85) 0%, rgba(15, 15, 35, 0.9) 100%), url('https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExaGx2dGJmZXVqbWl6dGNvdGNhbWZjZXNlbzBzaHNlNzNmbGVxZGNrZCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/JIX9t2j0ZTN9S/giphy.gif');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.06;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 158, 199, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(183, 148, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 217, 61, 0.2) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

/* Soft vignette like Baba hero */
.hero-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(60% 60% at 60% 40%, rgba(0,0,0,0.25), transparent 60%),
        radial-gradient(80% 60% at 20% 70%, rgba(0,0,0,0.2), transparent 70%);
    filter: blur(20px);
    opacity: .7;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding-top: 70px;
}

.hero-text {
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

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

.hero-description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary { background: var(--surface-color); color: var(--primary-color); border: 2px solid var(--primary-color); }

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.btn-support {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-support:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* -------- Hero reveal animations (Baba-style) -------- */
.reveal-up {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    animation: revealUp .7s cubic-bezier(.22,.61,.36,1) forwards;
}

.reveal-pop {
    opacity: 0;
    transform: translateY(22px) scale(.96);
    animation: popIn .8s cubic-bezier(.22,.61,.36,1) forwards;
}

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

@keyframes popIn {
    60% { opacity: 1; transform: translateY(0) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-pop,
    .floof-avatar,
    .floof-avatar-fallback,
    .hero-particles { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Floof Showcase */
.floof-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.floof-avatar-container {
    position: relative;
    margin-bottom: 30px;
}

.floof-avatar {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 20px 40px rgba(255, 158, 199, 0.3);
    transition: all 0.3s ease;
    animation: bounce 3s ease-in-out infinite;
}

.floof-avatar-fallback {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 20px 40px rgba(255, 158, 199, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: var(--gradient-primary);
    animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floof-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.3;
    filter: blur(20px);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.floof-status {
    margin-bottom: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-color);
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: var(--shadow-light);
    border: 2px solid var(--primary-color);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #48bb78;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-weight: 600;
    color: var(--primary-color);
}

.floof-sparkles {
    display: flex;
    gap: 20px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkle 4s ease-in-out infinite;
}

.sparkle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 1s;
}

.sparkle:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

.sparkle:nth-child(4) {
    bottom: 10%;
    right: 20%;
    animation-delay: 3s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

/* Section Styling */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--surface-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: left 0.3s ease;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .floof-avatar,
    .floof-avatar-fallback {
        width: 200px;
        height: 200px;
    }

    .btn {
        padding: 14px 28px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
