/* Custom Branding */
:root {
    --primary-blue: #004e92;
    --success-green: #28a745;
    --warning-orange: #ffc107;
}


.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: var(--primary-blue);
    border: none;
    padding: 12px 25px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #003a6d;
    transform: translateY(-2px);
}

.optional-badge {
    font-size: 0.75rem;
    vertical-align: middle;
    background-color: #e9ecef;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Score Circle Styling */
.score-display {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 10px solid var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto;
}
/* Sidebar and Layout remains same as before */

/* --- WATERMARK STYLING --- */


/* Optional: Adding a smaller repeating watermark for the card background */
.card::after {
    content: "CONFIDENTIAL AUDIT";
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
    font-weight: bold;
}
/* --- THE GEAR SHAPE FRAME --- */
/* --- THE GEAR CONTAINER --- */
/* --- THE PADDED SQUARE LOGO CONTAINER --- */
/* --- THE WRAPPER & SIDEBAR FIX --- */



/* --- THE CIRCULAR NEON LOGO (Fixed Size, No Zoom) --- */
.logo-neon-blur {
    width: 160px;           /* Large, extended size */
    height: 160px;          
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff; 
    border-radius: 50%;      /* Perfect Circle */
    
    /* Centering and spacing */
    margin: 40px auto;      
    z-index: 5;
    
    /* Animation: Only handles the glowing shadow now, no scaling */
    animation: glowOnly 4s infinite ease-in-out;
}

/* --- THE ROTATING NEON RING --- */
.logo-neon-blur::before {
    content: '';
    position: absolute;
    inset: -8px;            /* The thickness of the neon ring */
    z-index: -1; 
    border-radius: 50%;      /* Perfect Circle */
    
    background: conic-gradient(
        from 0deg,
        #ff0000, 
        #0d6efd, 
        #ffc107, 
        #ff0000  
    );

    filter: blur(12px);      
    opacity: 0.8;
    animation: rotateNeon 6s linear infinite; /* Smooth rotation */
}

/* --- THE LOGO IMAGE --- */
.logo-neon-blur img {
    width: 90%;             
    height: 70%;
    object-fit: contain;    
    filter: none;           /* Stays sharp and clear */
}

/* --- ANIMATION KEYFRAMES --- */

/* 1. Rotates the colors around the circle */
@keyframes rotateNeon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 2. Soft pulsing GLOW only (Removed the scale/zoom) */
@keyframes glowOnly {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    }
    50% { 
        /* The shadow grows slightly to look like a 'breathing' light */
        box-shadow: 0 10px 30px rgba(13, 110, 253, 0.3); 
    }
}

/* --- THE NEON LOGO CONTAINER (Circular & Large) --- */
.logo-neon-blur {
    width: 180px;           /* Large, "Hero" size */
    height: 160px;          
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff; 
    border-radius: 25%;      /* Perfect Circle for the container */
    
    /* Centering and sidebar protection */
    margin: 40px auto;      
    z-index: 5;
    
    /* Subtle breathing glow (No zooming/scaling) */
    animation: glowOnly 4s infinite ease-in-out;
}

/* --- THE NEON RING --- */
.logo-neon-blur::before {
    content: '';
    position: absolute;
    inset: -10px;           /* Slightly thicker ring for the larger size */
    z-index: -1; 
    border-radius: 25%;      /* Perfect Circle for the ring */
    
    background: conic-gradient(
        from 0deg,
        #ff0000, 
        #0d6efd, 
        #ffc107, 
        #ff0000  
    );

    filter: blur(14px);      
    opacity: 0.8;
    animation: rotateNeon 6s linear infinite; 
}

/* --- THE CIRCULAR LOGO IMAGE (Increased Size) --- */
.logo-neon-blur img {
    width: 100%;             /* Increased from 70% to fill more space */
    height: 85%;
    object-fit: cover;      /* 'cover' ensures it fills the circle perfectly */
    border-radius: 25%;      /* This makes the actual image file circular */
    filter: none;           /* Keeps the logo sharp */
    border: 2px solid #f0f0f0; /* Optional: subtle border to define the image circle */
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes rotateNeon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes glowOnly {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    }
    50% { 
        box-shadow: 0 10px 35px rgba(13, 110, 253, 0.25); 
    }
}
/* --- KEEP BUTTON BLUE WHEN DISABLED/CLICKED --- */
#submitBtn:disabled {
    background-color: #0d6efd !important; /* Forces Bootstrap Primary Blue */
    border-color: #0d6efd !important;
    color: #ffffff !important;           /* Keeps text white */
    opacity: 0.85;                       /* Slight fade so user knows it's submitted, but stays blue */
    cursor: not-allowed;
}

/* Optional: Keep the neon logo spinning during this state */
.btn-check:disabled + .timeframe-btn {
    opacity: 1; /* Keeps your timeframe buttons green if they were selected */
}

.list-group-item.active {
    background-color: #0d6efd !important;
    border-radius: 10px;
    margin: 5px 10px;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2);
}

#userImg {
    border: 2px solid #0d6efd;
    padding: 1px;
}

/* Sidebar History Items */
.history-item-btn {
    width: 100%;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    background: transparent;
    margin-bottom: 5px;
}

.history-item-btn:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateX(3px);
}

/* Detail Card Badges */
.bg-primary-soft {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
/* ============================= */
/* STOP HORIZONTAL SCROLLING FIX */
/* ============================= */

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Prevent any element from forcing page width */
* {
    box-sizing: border-box;
}

/* Fix Bootstrap row overflow */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
}

/* Prevent wide fixed sidebar from pushing overflow */
#sidebar-wrapper {
    left: 0;
    overflow-x: hidden;
}

/* Prevent content pushing outside viewport */
#page-content-wrapper {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix images (logo is likely causing overflow) */
img {
    max-width: 100%;
    height: auto;
}

/* Fix large cards / flex items breaking layout */
.card, .container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

/* Prevent long content from forcing scroll */
input, button, textarea {
    max-width: 100%;
}
/* ============================= */
/* SAFE RESPONSIVE FIX (NO LAYOUT BREAK) */
/* ============================= */

/* Prevent horizontal scroll WITHOUT breaking sidebar */
html, body {
    overflow-x: hidden;
}

/* Only prevent accidental overflow */
* {
    box-sizing: border-box;
}

/* Make main content shrink properly */
#page-content-wrapper {
    width: calc(100% - 240px);
}

/* Ensure sidebar stays fixed correctly */
#sidebar-wrapper {
    width: 240px;
    position: fixed;
    left: 0;
    top: 0;
}

/* Prevent Bootstrap row overflow */
.row {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Images never break layout */
img {
    max-width: 100%;
    height: auto;
}

/* Inputs never force scroll */
input, button, textarea {
    max-width: 100%;
}

/* ============================= */
/* RESPONSIVE BREAKPOINT */
/* ============================= */

@media (max-width: 992px) {

    /* Collapse sidebar safely (instead of removing it) */
    #sidebar-wrapper {
        position: relative;
        width: 100%;
        height: auto;
    }

    /* Content becomes full width */
    #page-content-wrapper {
        width: 100%;
        margin-left: 0;
    }

    /* Stack layout naturally */
    .row {
        flex-direction: column;
    }
}
/* ============================= */
/* RESPONSIVE SIDEBAR ONLY FIX */
/* ============================= */

#sidebar-wrapper {
    width: 240px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Push main content correctly */
#page-content-wrapper {
    margin-left: 240px;
    width: calc(100% - 240px);
}

/* Tablets */
@media (max-width: 992px) {

    #sidebar-wrapper {
        width: 200px;
    }

    #page-content-wrapper {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
}

/* Mobile */
@media (max-width: 768px) {

    #sidebar-wrapper {
        position: relative;
        width: 100%;
        height: auto;
    }

    #page-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
}
/* ============================= */
/* BACKGROUND IMAGE SLIDESHOW */
/* ============================= */

/* ============================= */
/* WORKING BACKGROUND SLIDER */
/* ============================= */

.bg-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* each image layer */
/* ============================= */
/* CLEAN BACKGROUND SLIDER */
/* ============================= */

.bg-slider {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fade 50s infinite;
}

/* Assign images */
.bg1  { background-image: url('/static/img1.jpg'); animation-delay: 0s; }
.bg2  { background-image: url('/static/img2.jpg'); animation-delay: 10s; }
.bg3  { background-image: url('/static/img3.jpg'); animation-delay: 20s; }
.bg4  { background-image: url('/static/img4.jpg'); animation-delay: 30s; }
.bg5  { background-image: url('/static/img5.jpg'); animation-delay: 40s; }
.bg6  { background-image: url('/static/img6.jpg'); animation-delay: 50s; }
.bg7  { background-image: url('/static/img7.jpg'); animation-delay: 60s; }
.bg8  { background-image: url('/static/img8.jpg'); animation-delay: 70s; }
.bg9  { background-image: url('/static/img9.jpg'); animation-delay: 80s; }
.bg10 { background-image: url('/static/img10.jpg'); animation-delay:90s; }

/* Smooth fade animation */
@keyframes fade {
    0%   { opacity: 0; }
    5%   { opacity: 0.45; }   /* 🔥 increased visibility */
    15%  { opacity: 0.45; }   /* stays visible longer */
    20%  { opacity: 0; }
    100% { opacity: 0; }
}

.analysis-output {
    white-space: pre-wrap;   /* keeps line breaks but allows wrapping */
    word-wrap: break-word;   /* prevents horizontal scroll */
    overflow-x: hidden;
    line-height: 1.6;
    color: #334155;
}


@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}