* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1d3a 50%, #2d3561 100%);
    color: #e0e6ed;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #64b5f6, #81c784, #ffb74d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.logo-section p {
    color: #b0bec5;
    font-size: 1rem;
}

/* Search Section */
.search-section {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    transition: all 0.3s ease;
    min-width: 280px;
}

.search-box:focus-within {
    border-color: #64b5f6;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.3);
}

.search-input {
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: #e0e6ed;
    font-size: 14px;
    flex: 1;
    outline: none;
}

.search-input::placeholder {
    color: #b0bec5;
}

.search-btn {
    background: linear-gradient(45deg, #64b5f6, #42a5f5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.4);
}

.filter-btn {
    background: linear-gradient(45deg, #64b5f6, #42a5f5);
    border: none;
    border-radius: 15px;
    padding: 12px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.4);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.mobile-filter-btn {
    background: linear-gradient(45deg, #64b5f6, #42a5f5);
    border: none;
    border-radius: 12px;
    padding: 10px 15px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.mobile-filter-btn:hover {
    transform: translateY(-2px);
}

.results-count {
    color: #b0bec5;
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    height: fit-content;
    max-height: calc(100vh - 40px); /* Prevent sidebar from being taller than viewport */
    overflow-y: auto; /* Add scrolling if content overflows */
    position: sticky;
    top: 20px;
    transition: all 0.3s ease;
}
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar h3 {
    color: #64b5f6;
    font-size: 1.2rem;
    font-weight: 600;
}

.mobile-close {
    display: none;
    background: none;
    border: none;
    color: #64b5f6;
    cursor: pointer;
    padding: 5px;
}

.category-list {
    list-style: none;
}



.category-item {
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.category-item:hover, .category-item.active {
    background: rgba(100, 181, 246, 0.1);
    border-left-color: #64b5f6;
    transform: translateX(5px);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Content Area */
.content-area {
    display: grid;
    gap: 20px;
}

.medication-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.medication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #64b5f6, #81c784, #ffb74d);
}

.medication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(100, 181, 246, 0.3);
}

.medication-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.medication-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #64b5f6;
    margin-bottom: 5px;
    line-height: 1.3;
}

.medication-category {
    background: rgba(129, 199, 132, 0.2);
    color: #81c784;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.warning-badge {
    background: rgba(255, 183, 77, 0.2);
    color: #ffb74d;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.danger-badge {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.info-section {
    margin: 20px 0;
}

.section-title {
    color: #81c784;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(45deg, #64b5f6, #81c784);
    border-radius: 2px;
}

.interaction-item, .precaution-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.interaction-item {
    border-left-color: #ffb74d;
}

.precaution-item {
    border-left-color: #64b5f6;
}

.interaction-item:hover, .precaution-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.drug-name {
    color: #ffb74d;
    font-weight: 600;
    margin-bottom: 5px;
}

.risk-description {
    color: #e0e6ed;
    line-height: 1.5;
    font-size: 0.95rem;
}

.hidden {
    display: none;
}

.no-results {
    text-align: center;
    color: #b0bec5;
    font-size: 1.2rem;
    margin: 50px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.footer-info {
    text-align: center;
    color: #b0bec5;
    font-size: 0.9rem;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 300px 1fr;
        gap: 20px;
    }
    
    .search-box {
        min-width: 250px;
    }
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -350px;
        width: 320px;
        height: 100vh;
        z-index: 1002;
        border-radius: 0;
        padding: 20px;
        overflow-y: auto;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .mobile-controls {
        display: flex;
    }
    
    .mobile-close {
        display: block;
    }
    
    .search-box {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .logo-section h1 {
        font-size: 1.5rem;
    }
    
    .search-section {
        width: 100%;
        justify-content: center;
    }
    
    .search-box {
        flex: 1;
        max-width: 100%;
        min-width: unset;
    }
    
    .medication-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .medication-name {
        font-size: 1.3rem;
    }
    
    .sidebar {
        width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
        border-radius: 15px;
    }
    
    .logo-section h1 {
        font-size: 1.3rem;
    }
    
    .logo-section p {
        font-size: 0.9rem;
    }
    
    .medication-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .medication-name {
        font-size: 1.2rem;
    }
    
    .search-section {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .search-box {
        width: 100%;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
    
    .sidebar {
        width: 100%;
        left: -100%;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(100, 181, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(100, 181, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(100, 181, 246, 0); }
}
/* CSS pour le toggle en forme de neurone */
.neuron-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.neuron-container {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.neuron-container:hover {
    transform: scale(1.05);
}

.neuron-svg {
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.neuron-body {
    fill: #2c3e50;
    transition: fill 0.3s ease;
}

.neuron-dendrite {
    stroke: #2c3e50;
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

.neuron-terminal {
    fill: #2c3e50;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Mode avancé activé */
.neuron-container.advanced .neuron-body {
    fill: #3498db;
}

.neuron-container.advanced .neuron-dendrite {
    stroke: #3498db;
}

.neuron-container.advanced .neuron-terminal {
    fill: #e74c3c;
    animation: neuralPulse 2s infinite;
}

/* Animation des impulsions nerveuses */
@keyframes neuralPulse {
    0% {
        fill: #e74c3c;
        transform: scale(1);
        filter: drop-shadow(0 0 5px #e74c3c);
    }
    50% {
        fill: #f39c12;
        transform: scale(1.3);
        filter: drop-shadow(0 0 15px #f39c12);
    }
    100% {
        fill: #e74c3c;
        transform: scale(1);
        filter: drop-shadow(0 0 5px #e74c3c);
    }
}

/* Animation séquentielle pour différents terminaux */
.neuron-container.advanced .neuron-terminal:nth-child(odd) {
    animation-delay: 0s;
}

.neuron-container.advanced .neuron-terminal:nth-child(even) {
    animation-delay: 0.3s;
}

.neuron-container.advanced .neuron-terminal:nth-child(3n) {
    animation-delay: 0.6s;
}

.neuron-container.advanced .neuron-terminal:nth-child(4n) {
    animation-delay: 0.9s;
}

.toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    transition: color 0.3s ease;
    user-select: none;
}

.neuron-container.advanced + .toggle-text {
    color: #3498db;
    font-weight: 600;
}

/* Animation d'impulsion sur le corps du neurone */
.neuron-container.advanced .neuron-body {
    animation: bodyPulse 3s infinite ease-in-out;
}

@keyframes bodyPulse {
    0%, 100% {
        fill: #3498db;
        filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.3));
    }
    50% {
        fill: #2980b9;
        filter: drop-shadow(0 0 15px rgba(52, 152, 219, 0.6));
    }
}
/* Styling for the credit floater */
.credit-floater {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: transparent;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.credit-floater:hover {
    transform: scale(1.1);
}

.floater-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Styling for the profile popup */
.profile-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Content of the popup */
.popup-content {
    background: #e5953b;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: white;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.popup-content h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    margin-bottom: 15px;
    letter-spacing: 1px;
	color : #282c34;
}

.popup-content p {
    font-size: 18px;
    margin: 5px 0;
    color: #1e90ff;
}

.popup-content a {
    text-decoration: none;
    color: #1e90ff;
}

.popup-content a:hover {
    text-decoration: underline;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Popup fade-in effect */
.profile-popup.show {
    display: flex;
    opacity: 1;
}

.profile-popup.show .popup-content {
    transform: scale(1);
}

/* CSS pour le pop-up de notice - Version sans conflits */
.notice-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notice-popup-overlay.notice-active {
    opacity: 1;
    visibility: visible;
}

.notice-popup-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s ease;
}

.notice-popup-overlay.notice-active .notice-popup-content {
    transform: scale(1) translateY(0);
}

.notice-popup-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 25px 30px;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.notice-popup-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notice-popup-header .notice-icon {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-popup-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.notice-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notice-popup-body {
    padding: 30px;
}

.notice-popup-subtitle {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 25px;
    text-align: center;
    font-style: italic;
}

.notice-mode-section {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid;
}

.notice-mode-section.notice-light {
    background: #f8f9fa;
    border-left-color: #6c757d;
}

.notice-mode-section.notice-advanced {
    background: #e3f2fd;
    border-left-color: #3498db;
}

.notice-mode-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-mode-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.notice-mode-section.notice-light .notice-mode-icon {
    background: #6c757d;
}

.notice-mode-section.notice-advanced .notice-mode-icon {
    background: #3498db;
}

.notice-mode-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}

.notice-mode-details {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 14px;
    color: #666;
}

.notice-usage-tips {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
}

.notice-usage-tips h4 {
    color: #856404;
    margin: 0 0 15px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice-usage-tips ul {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

.notice-usage-tips li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.notice-popup-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.notice-checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.notice-checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3498db;
}

.notice-popup-buttons {
    display: flex;
    gap: 10px;
}

.notice-btn-popup {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.notice-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.notice-btn-secondary:hover {
    background: #dee2e6;
}

.notice-btn-primary {
    background: #3498db;
    color: white;
}

.notice-btn-primary:hover {
    background: #2980b9;
}

/* Responsive */
@media (max-width: 768px) {
    .notice-popup-content {
        width: 95%;
        margin: 20px;
    }
    
    .notice-popup-header {
        padding: 20px;
    }
    
    .notice-popup-header h2 {
        font-size: 20px;
    }
    
    .notice-popup-body {
        padding: 20px;
    }
    
    .notice-popup-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .notice-popup-buttons {
        justify-content: center;
    }
}

.sidebar-toggle-buttons {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}

.sidebar-toggle-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #b0bec5;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar-toggle-btn.active {
    background: linear-gradient(45deg, #64b5f6, #42a5f5);
    color: white;
    font-weight: 600;
}

.sidebar-toggle-btn:hover:not(.active) {
    background: rgba(100, 181, 246, 0.1);
    color: #64b5f6;
}

.pathology-list .category-item.active {
    background: rgba(244, 143, 177, 0.1);
    border-left-color: #f48fb1;
}

.pathology-list .category-item:hover {
    background: rgba(244, 143, 177, 0.1);
    border-left-color: #f48fb1;
}

@media (max-width: 768px) {
    .sidebar-toggle-btn {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
}