* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(images/medicine_1.jpg) center/cover;
    color: rgb(179, 175, 175);
    padding: 4rem 2rem;
    text-align: center;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.search-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

#drugSearch {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
}

#drugSearch:focus {
    outline: none;
    border-color: #007bff;
}

button {
    background: #007bff;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

button:hover {
    background: #0056b3;
}

#results {
    margin-top: 2rem;
}

.drug-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.drug-card h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.drug-card-small {
    max-width: 100%;
    overflow: hidden;
}

.drug-card-small h4 {
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    hyphens: none !important;
    max-width: 100% !important;
    display: block !important;
}

.info-section h3 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.scrollable-content {
    max-height: 150px;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 3px;
}

.error {
    background: #f8f9fa;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
}

.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
}

.categories {
    margin: 2rem 0;
    text-align: center;
}

.categories h2 {
    color: white;
    font-size: 1.8rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.category-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    justify-content: space-between;
    height: 100%;
    display: flex;
    flex-direction: column;

}

.category-card .icon {
    font-size: 2em;
    display: block;
    margin-bottom: 0.5rem;
}

.category-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 2.8rem;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    border-color: #164577;
    background: rgba(255, 255, 255, 1);
}

.category-card:hover .icon {
    animation: pulse 1s infinite;
}

.category-results {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.results-count {
    color: #666;
    margin-bottom: 1.5rem;
}

.drugs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.drug-card-small {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drug-card-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #e3f2fd;
}

.drug-card-small h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.drug-purpose {
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
    line-height: 1.4;
}

@keyframes pulse {
    0% {transform: scale(1);}
    50% {transform: scale(1.1);}
    100% {transform: scale(1);}
}

.category-card:active {
    transform: translateY(-2px) scale(0.98);
}

.category-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.category-card:hover::before {
    opacity: 1;
}

.click-hint {
    color: #007bff;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.category-card:hover .click-hint {
    opacity: 1;
    transform: translateX(5px);
}

.manual-location, .pharmacy-results {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

.location-search {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.location-search input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
}

.pharmacy-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.pharmacy-item:last-child {
    border-bottom: none;
}

.small-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
}

.api-credit {
    font-size: 0.8rem;
    color: #999;
    text-align: center;
    margin-top: 1rem;
}

.recalls-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.recalls-info {
    color: #666;
    margin-bottom: 1.5rem;
    text-align: center;
}

.recall-item {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.recall-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.recall-item.recent {
    border-left-color: #fd7e14;
    background: #fff9f0;
}

.recall-item h3 {
    color: rgb(194 192 192);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.recall-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.recall-company {
    background: rgba(220, 53, 69, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #c53030;
}

.recall-reason {
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/*Responsive design*/
@media (max-width: 768px) {
    .search-section {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 2rem;
    }
   
    .location-search {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .location-search input,
    .location-search button {
        width: 100%;
    }
}

@media (max-width: 376px) {
    .container {
        padding: 0 0.8rem;
    }

    .hero h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
    }

    .hero p {
        font-size: 1rem !important;
    }

    .search-section {
        flex-direction: column;
        gap: 0.8rem;
        margin-bottom: 1.5rem;
    }

    #drugSearch, .search-section button {
        font-size: 16px;
        padding: 12px 10px;
    }

    .categories h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem 0;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .category-card {
        padding: 1.2rem 1rem;
    }

    .category-card .icon {
        font-size: 1.8rem;
    }

    .drugs-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .drug-card-small {
        padding: 1rem 0.8rem;
    }

    .drug-card-small h4 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .drug-purpose {
        font: 0.85rem;
    }

    body, html {
        overflow-x: hidden;
        max-width: 100%;
    }

    .recall-reason h3 {
        font-size: 0.8rem;
    }

    .recall-reason {
        font-size: 0.9rem;
    }

    .recall-item h3 {
        font-size: 0.9rem;
    }
}
