@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* Base styles */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(-45deg, #EAEAEA, #F5F5F5, #EAEAEA, #F5F5F5);
    background-size: 400% 400%;
    animation: elegant-gradient 20s ease-in-out infinite;
    color: #334155;
    line-height: 1.6;
}

a {
    text-decoration: none; /* Removed underline from all links */
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}
@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }

/* Elegant background gradient animation */
@keyframes elegant-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header animation for a soft entry */
@keyframes header-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.animated-header h1, .animated-header p {
    animation: header-fade-in 1s ease-out forwards;
}

.animated-header p {
    animation-delay: 0.3s;
}

.shadow-sm-light {
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.12);
}

.category-link {
    display: block;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    line-height: 1.25rem;
    background-color: #fff;
    border: 1px solid #d1d5db;
    color: #4b5563;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    text-align: center;
}
.category-link:hover {
    background-color: #e5e7eb;
}

.category-link.active {
    background-color: #3B82F6;
    color: #FFFFFF;
    font-weight: 500;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

/* Card entry animation */
.card-enter {
    opacity: 0;
    transform: translateY(20px);
}

.card-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* Smooth animation for the search input on focus */
#archive-search:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Hide scrollbars for the body */
body::-webkit-scrollbar {
    display: none;
}
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Responsive Grid Layout */
.responsive-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* Small screens */
}
@media (min-width: 640px) {
    .responsive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .responsive-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .responsive-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .responsive-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Back to top button styling */
#back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #3B82F6;
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0.75rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}
