/* KB AI Dark Theme Styles */

/* CSS Variables for Dark Theme */
:root {
    --deep-black: #000000;
    --darkest-navy: #0f172a;
    --neon-purple: #7c3aed;
    --neon-cyan: #06b6d4;
    --white: #ffffff;
    --muted-gray: #94a3b8;
    --dark-gray: #1e293b;
    --glass-bg: rgba(30, 41, 59, 0.2);
    --glass-border: rgba(124, 58, 237, 0.5);
}

/* Particle Background Animation */
.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--neon-purple);
    opacity: 0;
    animation: particle-float 15s infinite ease-in-out;
}

.particle.cyan {
    background: var(--neon-cyan);
}

@keyframes particle-float {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1);
        opacity: 0;
    }
}

/* Body Styles */
body.kb-ai-dark {
    background: var(--deep-black);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 20%);
    color: var(--white);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    /* Grid pattern overlay for cyberpunk effect */
    background-image: 
        linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 20%);
    background-size: 20px 20px, 20px 20px, 100% 100%, 100% 100%;
}

/* Particle Container */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Main Layout */
.kb-ai-container {
    display: flex;
    min-height: 100vh;
    max-width: 100vw;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Sidebar Styles */
.sidebar {
    width: 15%;
    background: var(--darkest-navy);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(124, 58, 237, 0.2);
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
    letter-spacing: 1px;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--muted-gray);
    position: relative;
    border: 1px solid transparent;
}

.nav-item:hover {
    border: 1px solid var(--neon-purple);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

.nav-item:hover {
    color: var(--white);
    transform: translateX(5px);
}

.nav-item.active {
    background: rgba(124, 58, 237, 0.3);
    color: var(--white);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
    position: relative;
    overflow: hidden;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, var(--neon-purple), var(--neon-cyan));
    border-radius: 0 2px 2px 0;
}

.bottom-icons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(124, 58, 237, 0.1);
}

.icon-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
}

/* Workspace Styles */
.workspace {
    width: 55%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.workspace-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(90deg, var(--white), var(--muted-gray));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    position: relative;
}

.workspace-header p {
    font-size: 1.1rem;
    color: var(--muted-gray);
    margin: 0.5rem 0 0 0;
    position: relative;
}

.workspace-header p::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    border-radius: 1px;
}

.input-area {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.input-area:focus-within {
    border-color: var(--neon-purple);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

.input-field {
    width: 100%;
    min-height: 150px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--dark-gray);
    border-radius: 0.75rem;
    padding: 1rem;
    color: var(--white);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.input-field:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

.input-field::placeholder {
    color: var(--muted-gray);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.filter-chip {
    background: var(--dark-gray);
    border: 1px solid var(--muted-gray);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.filter-chip:hover::before {
    left: 100%;
}

.filter-chip.selected {
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    border-color: transparent;
    color: var(--white);
    font-weight: 500;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.generate-btn {
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    color: var(--white);
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    align-self: flex-start;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.generate-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.6);
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:active {
    transform: translateY(0);
}

/* Output Card Styles */
.output-card {
    width: 30%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.output-header {
    color: var(--muted-gray);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(124, 58, 237, 0.1), transparent);
    transform: rotate(45deg);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% {
        transform: rotate(45deg) translateX(-100%);
    }
    100% {
        transform: rotate(45deg) translateX(100%);
    }
}

.output-content {
    color: var(--white);
    font-size: 1.1rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.5rem;
    overflow-y: auto;
    max-height: 300px;
}

.action-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-icon:hover {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .kb-ai-container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    }
    
    .logo {
        margin-bottom: 0;
        padding: 0.5rem 1rem;
    }
    
    .nav-items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: calc(100% - 150px);
    }
    
    .bottom-icons {
        flex-direction: row;
        padding-top: 0;
        border-top: none;
        border-left: 1px solid rgba(124, 58, 237, 0.1);
        padding-left: 1rem;
        margin-left: auto;
    }
    
    .workspace, .output-card {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .workspace {
        padding: 1.5rem;
    }
    
    .workspace-header h1 {
        font-size: 2rem;
    }
    
    .input-field {
        min-height: 120px;
    }
    
    .generate-btn {
        width: 100%;
        justify-content: center;
    }
}