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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    text-align: center;
}

h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.search-bar {
    margin: 25px 0;
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 50px;
    padding: 5px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-bar:focus-within {
    background: white;
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.search-bar input {
    flex: 1;
    padding: 12px 12px 12px 45px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    outline: none;
    border-radius: 50px;
}

.search-bar input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    left: 18px;
    color: #667eea;
    font-size: 1.2em;
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s ease;
}

.search-bar:focus-within .search-icon {
    transform: scale(1.1);
    color: #5568d3;
}

.search-clear {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    z-index: 2;
}

.search-clear:hover {
    background: #fee;
    color: #dc3545;
    transform: rotate(90deg) scale(1.1);
}

.search-clear:active {
    transform: rotate(90deg) scale(0.95);
}

.search-clear.visible {
    display: flex;
}

.search-results-info {
    text-align: center;
    margin: 10px 0 0 0;
    font-size: 0.9em;
    color: #667eea;
    font-weight: 500;
    min-height: 20px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.search-results-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.search-results-info.empty-state {
    color: #dc3545;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.quick-link-btn {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-weight: 600;
    color: #667eea;
}

.quick-link-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.categories {
    display: grid;
    gap: 25px;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.category-icon {
    font-size: 2em;
    margin-right: 15px;
}

.category-title {
    font-size: 1.5em;
    color: #333;
    font-weight: 700;
    flex-grow: 1;
}

.toggle-icon {
    font-size: 1.2em;
    color: #667eea;
    transition: transform 0.3s;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.resources-list {
    display: grid;
    gap: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.resources-list.expanded {
    max-height: 2000px;
}

.resource-item {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.resource-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.resource-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.resource-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
    word-break: break-all;
    display: inline-block;
    margin-bottom: 5px;
}

.resource-link:hover {
    text-decoration: underline;
}

.resource-description {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.verified-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    margin-left: 8px;
}

.emergency-banner {
    background: #dc3545;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.emergency-banner a {
    color: white;
    text-decoration: underline;
}

footer {
    text-align: center;
    color: white;
    padding: 30px;
    margin-top: 40px;
}

footer a {
    color: white;
}

.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: none;
    animation: fadeIn 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.empty-state.visible {
    display: block;
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: white;
}

.empty-state p {
    font-size: 1.1em;
    margin-bottom: 25px;
    opacity: 0.9;
}

.empty-state p span {
    font-weight: 700;
    color: #ffd700;
}

.empty-state-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.empty-state-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
    background: #f8f9fa;
}

.empty-state-button:active {
    transform: translateY(0);
}

.empty-state-suggestions {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.suggestions-title {
    font-size: 0.95em;
    margin-bottom: 15px;
    opacity: 0.8;
    font-weight: 600;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.suggestion-chip:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Search loading animation */
.search-bar.loading input {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Highlight search matches */
.search-highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.8em;
    }
    
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    header {
        padding: 20px;
    }

    .category-card {
        padding: 20px;
    }

    .category-title {
        font-size: 1.2em;
    }

    .category-icon {
        font-size: 1.5em;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .emergency-banner {
        font-size: 0.9em;
        padding: 12px 15px;
    }
}
