/* assets/css/style.css */

/* =========================================
   1. Base Variables & Typography
   ========================================= */
:root {
    --primary-color: #0d6efd;
    --hover-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* =========================================
   2. Dark Mode Overrides
   ========================================= */
[data-bs-theme="dark"] body {
    background-color: #121212;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .card {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2a2a2a !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .accordion-button,
[data-bs-theme="dark"] .accordion-item {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}

/* =========================================
   3. Animations & Hover Effects
   ========================================= */
/* Lift effect for cards */
.hover-lift {
    transition: var(--hover-transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="dark"] .hover-lift:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5) !important;
}

/* Pulsing effect for the loading spinner */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* =========================================
   4. Interactive Anatomy SVG Styles
   ========================================= */
#humanBodySvg {
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    transition: filter 0.3s ease;
}

[data-bs-theme="dark"] #humanBodySvg {
    background: #1e1e1e !important;
    filter: drop-shadow(0 4px 6px rgba(255,255,255,0.05));
}

.organ path, .organ ellipse {
    transition: fill 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
    transform-origin: center;
}

.organ:hover path, .organ:hover ellipse {
    fill: var(--primary-color) !important;
    transform: scale(1.02);
}

#organTooltip {
    z-index: 1050;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(4px);
}

/* =========================================
   5. Anatomy Drag & Drop Game Styles
   ========================================= */
.draggable-organ {
    transition: background-color 0.2s ease, transform 0.1s;
    user-select: none; /* Prevent text selection while dragging */
    touch-action: none; /* Better mobile handling if implemented later */
}

.draggable-organ:active {
    transform: scale(0.95);
}

.dropzone {
    transition: background-color 0.3s ease, border-color 0.3s ease;
    z-index: 10;
}

/* Ensure dropped items fit perfectly inside the dropzone */
.dropzone .draggable-organ {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* =========================================
   6. Custom Scrollbar
   ========================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1; 
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #121212; 
}

::-webkit-scrollbar-thumb {
    background: #888; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555; 
}