/* DeepIntel Main Stylesheet */
/* Extracted from index.html for modular architecture */

/* Base Typography */
body {
    font-family: 'Outfit', sans-serif;
    background-color: #020617;
    background-image: url('/static/img/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   GLASSMORPHISM UTILITIES
   ============================================ */
.glass {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.glass-lighter {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Interactions */
.glass-lighter:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
}

/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow-S {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.25);
    border-color: rgba(220, 38, 38, 0.5) !important;
}

.glow-A {
    box-shadow: 0 0 30px rgba(234, 179, 8, 0.25);
    border-color: rgba(234, 179, 8, 0.5) !important;
}

.glow-text {
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse-nuclear {
    0%, 100% {
        box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.8), 0 0 5px rgba(255, 100, 100, 0.5);
    }
}

.animate-nuclear {
    animation: pulse-nuclear 2s infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Card Hover */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* ============================================
   ALPINE.JS UTILITIES
   ============================================ */
[x-cloak] {
    display: none !important;
}

/* ============================================
   MERMAID DIAGRAM STYLES
   ============================================ */
/* Fullscreen Container */
#mermaid-fullscreen-container svg {
    max-width: none !important;
    max-height: none !important;
    width: 100% !important;
    height: 95% !important;
    position: absolute !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* In Chat - Proper sizing */
.prose .mermaid {
    max-width: 100%;
    overflow-x: auto;
    min-height: 200px;
}

.prose .mermaid svg {
    max-width: 600px !important;
    width: auto !important;
    height: auto !important;
    min-height: 180px;
    margin: 0 auto;
    font-size: 12px !important;
}

.prose .mermaid .node rect,
.prose .mermaid .node circle,
.prose .mermaid .node polygon {
    fill: #1e293b !important;
    stroke: #38bdf8 !important;
}

.prose .mermaid .edgeLabel {
    background: #0f172a !important;
    color: #94a3b8 !important;
}

/* ============================================
   TABLE LINK BUTTONS
   ============================================ */
.prose table a,
.prose td a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 6px;
    color: #38bdf8 !important;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.prose table a:hover,
.prose td a:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.prose table a::before {
    content: '🔗';
    font-size: 10px;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.8);
}
