/* Basic Clean Styles (Light Mode Default) */
body {
    transition: background-color 0.3s, color 0.3s;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effect for footer icon */
.hover-scale {
    transition: transform 0.2s;
    display: inline-block;
}

.hover-scale:hover {
    transform: scale(1.2);
    color: var(--bs-primary);
}


/* 
   --------------------------------------------------
   DARK MODE "MATRIX / CYBER FORENSIC" AESTHETIC 
   --------------------------------------------------
*/
[data-bs-theme="dark"] {
    --bs-body-bg: #0d1117;
    /* GitHub Dark Dimmed / Cyber Dark */
    --bs-body-color: #c9d1d9;
    --bs-primary: #00ff41;
    /* Matrix Green */
    --bs-primary-rgb: 0, 255, 65;
    --bs-secondary: #8b949e;

    font-family: 'Courier New', Courier, monospace;
    /* Monospace for terminal feel */
}

/* Navbar Dark Overrides */
[data-bs-theme="dark"] .navbar {
    background-color: #161b22 !important;
    border-bottom: 1px solid #30363d !important;
}

[data-bs-theme="dark"] .navbar-brand {
    color: #00ff41 !important;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

/* Buttons in Dark Mode */
[data-bs-theme="dark"] .btn-primary {
    background-color: transparent;
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.2);
}

[data-bs-theme="dark"] .btn-primary:hover {
    background-color: #00ff41;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
}

[data-bs-theme="dark"] .btn-outline-success {
    color: #00ff41;
    border-color: #00ff41;
}

[data-bs-theme="dark"] .btn-outline-success:hover {
    background-color: #00ff41;
    color: #000;
}

/* Cards in Dark Mode */
[data-bs-theme="dark"] .card {
    background-color: #161b22;
    border: 1px solid #30363d;
}

[data-bs-theme="dark"] .card-header {
    background-color: #21262d;
    border-bottom: 1px solid #30363d;
    color: #00ff41;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #161b22;
    border-color: #30363d;
    color: #c9d1d9;
}

/* Inputs in Dark Mode */
[data-bs-theme="dark"] .form-control {
    background-color: #0d1117;
    border-color: #30363d;
    color: #00ff41;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #0d1117;
    border-color: #00ff41;
    box-shadow: 0 0 0 0.25rem rgba(0, 255, 65, 0.25);
    color: #00ff41;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #21262d;
    border-color: #30363d;
    color: #00ff41;
}

/* Alerts in Dark Mode - custom borders to pop */
[data-bs-theme="dark"] .alert-success {
    background-color: rgba(46, 160, 67, 0.15);
    border: 1px solid #2ea043;
    color: #3fb950;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(248, 81, 73, 0.15);
    border: 1px solid #f85149;
    color: #ff7b72;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(187, 128, 9, 0.15);
    border: 1px solid #bb8009;
    color: #d29922;
}

/* Footer Dark Mode */
[data-bs-theme="dark"] footer {
    border-top: 1px solid #30363d !important;
    background-color: #161b22;
}

/* ----------------------------------------
   AI PANEL STYLES
   ---------------------------------------- */

/* Card with gradient top border */
.ai-panel {
    border-top: 3px solid transparent !important;
    background-image: linear-gradient(var(--bs-card-bg, #fff), var(--bs-card-bg, #fff)),
        linear-gradient(90deg, #6366f1, #06b6d4);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: fadeIn 0.4s ease-in-out;
}

/* AI Response Bubble */
.ai-response {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.06));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-left: 3px solid #6366f1;
    color: var(--bs-body-color);
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    font-style: normal;
    line-height: 1.5;
    white-space: pre-wrap;
    word-spacing: normal;
    letter-spacing: normal;
    padding: 1rem 1.25rem;
}

/* Dark mode overrides for AI panel */
[data-bs-theme="dark"] .ai-panel {
    background-image: linear-gradient(#161b22, #161b22),
        linear-gradient(90deg, #00ff41, #06b6d4);
}

[data-bs-theme="dark"] .ai-response {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05), rgba(6, 182, 212, 0.05));
    border-color: rgba(0, 255, 65, 0.25);
    border-left: 3px solid #00ff41;
    color: #e0e0e0;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-style: normal;
}

/* Navbar AI key indicator dot */
#aiKeyStatus {
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}