/* Reset och grundinställningar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --danger: #f72585;
    --warning: #f9c74f;
    --success: #4cc9f0;
    --dark: #212529;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f5f7fb;
    padding-bottom: 80px; /* För footer */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
    text-align: center;
    padding: 10px 0;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

.warning-banner {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border-left: 4px solid var(--warning);
}

/* Filter och sökning */
.filter-container {
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f5f7fb;
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

#searchInput {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 16px;
    background-color: white;
    border: 2px solid var(--gray-light);
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    flex-grow: 1;
    text-align: center;
}

.filter-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Drugs grid */
.drugs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 30px;
}

.drug-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeIn 0.5s ease-out;
}

.drug-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.drug-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drug-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
}

.drug-category {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drug-category.stimulant {
    background-color: rgba(76, 201, 240, 0.15);
    color: #0a8ea8;
}

.drug-category.depressant {
    background-color: rgba(247, 37, 133, 0.15);
    color: #c2185b;
}

.drug-category.hallucinogen {
    background-color: rgba(249, 199, 79, 0.15);
    color: #c28f0a;
}

.drug-category.opioid {
    background-color: rgba(114, 9, 183, 0.15);
    color: #7209b7;
}

.drug-body {
    padding: 20px;
}

.drug-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-value {
    font-size: 1rem;
    line-height: 1.5;
}

.effects-list {
    list-style-type: none;
}

.effects-list li {
    padding: 6px 0;
    position: relative;
    padding-left: 20px;
}

.effects-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.drug-footer {
    padding: 16px 20px;
    background-color: var(--gray-light);
    font-size: 0.85rem;
    color: var(--gray);
    border-top: 1px solid #ddd;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 25px 0;
    margin-top: 30px;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

.footer-content {
    text-align: center;
}

footer p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-note {
    font-size: 0.8rem !important;
    opacity: 0.7 !important;
    margin-bottom: 15px !important;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.footer-links a {
    color: var(--success);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    line-height: 1;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.modal-body h3 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

/* Animationer */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiv design */
@media (min-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }
    
    .drugs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-btn {
        flex-grow: 0;
    }
}

@media (min-width: 992px) {
    .drugs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .drug-info {
        grid-template-columns: 1fr 1fr;
    }
}
