/* Global Styles */
/* Global Styles */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

/* Custom Gradients */
.bg-gradient-primary-soft {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    /* Fallback/Alternative: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%); */
    /* Let's try a subtle nice one */
    background: linear-gradient(to right, #eef2f3, #8e9eab);
    /* Metallic / Clean */
    background: linear-gradient(to right, #ECE9E6, #FFFFFF);
    /* Clouds */
    background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
    /* Blue soft */
}

[data-bs-theme="dark"] .bg-gradient-primary-soft {
    background: linear-gradient(120deg, #2a2a2a 0%, #3a3a3a 100%);
    color: white;
}

.avatar-circle {
    width: 60px;
    height: 60px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


/* Chat/Log Styling from Scaffolding */
.chat-msg {
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-box {
    overflow-y: auto;
    scroll-behavior: smooth;
}

.chat-msg-wrap {
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.chat-msg-wrap.msg-ai .bubble {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem 1rem 1rem 0;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-msg-wrap.msg-user {
    text-align: right;
}

.chat-msg-wrap.msg-user .bubble {
    background: #e7f1ff;
    color: #0d6efd;
    border: 1px solid #b6d4fe;
    border-radius: 1rem 1rem 0 1rem;
    padding: 0.75rem 1rem;
}

[data-bs-theme="dark"] .chat-msg-wrap.msg-user .bubble {
    background: #0d6efd;
    color: #fff;
    border-color: #0a58ca;
}

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

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

/* Video Container & Ad Overlay */
#video-container {
    overflow: hidden;
    border-radius: 0.5rem;
    background: #000;
}

/* Fullscreen adjustments */
#video-container:fullscreen {
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
}

#video-container:fullscreen video {
    height: 100%;
    width: 100%;
    object-fit: contain;
    /* Ensure video isn't cropped */
}

#video-container:fullscreen .ad-overlay {
    /* distinct positioning for fullscreen */
    position: fixed;
    bottom: 8vh;
    left: 4vw;
    width: 35vw;
    /* Responsive width */
    max-width: 600px;
    /* Cap width for huge screens */
    min-width: 400px;
    z-index: 9999;
    /* Ensure on top */

    /* Remove transforms that might blur images */
    transform: none;

    /* enhanced styling for big screen */
    background: rgba(10, 10, 10, 0.85);
    padding: 2rem;
    border-radius: 1rem;
}

/* Ensure image container works in fullscreen */
#video-container:fullscreen #ad-image-container {
    width: 100%;
    margin-bottom: 1.5rem !important;
}

/* Ensure text is readable on large screen */
#video-container:fullscreen h4 {
    font-size: 1.5rem;
}

#video-container:fullscreen p {
    font-size: 1.1rem;
}

.ad-overlay {
    position: absolute;
    bottom: 40px;
    left: 20px;

    /* Bigger width for image ads */
    width: 480px;
    max-width: 90%;

    /* Glassmorphism */
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    z-index: 10;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.ad-overlay.active {
    transform: translateY(0);
    opacity: 1;
}

/* Ad Content Typography */
#ad-title {
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #fff, #ccc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#ad-copy {
    font-weight: 300;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Log specific styles */
.log-timestamp {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    margin-right: 0.5rem;
}

.highlight-match {
    background: rgba(25, 135, 84, 0.2);
    color: var(--bs-success);
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 600;
}

/* Hide native fullscreen button in Chrome/Edge/Safari */
video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* Hide in Firefox */
video::-moz-full-screen-button {
    display: none !important;
}

/* Hide in generic Controls */
video:fullscreen {
    /* If native fullscreen is somehow triggered, this ensures no weird styling conflict, mostly no-op */
    background: #000;
}

/* Pulse Animation for Overlay Text */
@keyframes pulse-slow {
    0% {
        opacity: 0.5;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.98);
    }
}

.animate-pulse {
    animation: pulse-slow 2s infinite ease-in-out;
}

/* Radar Scan Effect */
.radar-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(13, 110, 253, 0.5) 100%);
    position: relative;
    animation: radar-spin 1.5s linear infinite;
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.4);
}

.radar-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #fff;
}

@keyframes radar-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* List Item Hover */
.list-group-item.hover-effect {
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.list-group-item.hover-effect:hover {
    transform: translateX(5px);
    border-left: 4px solid #0d6efd;
    background-color: var(--bs-body-bg) !important;
}