/* style.css */

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

/* General styles */
html {
    background-color: #280000;
}

body {
    font-family: system-ui;
    background: radial-gradient(circle at top, #d20707, #100101);
    margin: 0;
    padding: 0;
    text-align: center;
}

h1 {
    animation: fadeIn 0.4s;
    color: white;
    padding: 2px;
    text-shadow: 2px 2px 4px #000000;
    font-size: 38px;
    margin: 10px;
}

button {
    padding: 10px 20px;
    background-color: #a40101;
    color: white;
    border: 3px solid #0a012d;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 16px;
}

button:hover {
    background-color: #d12020;
}

.header {
    background-color: #280000;
    padding: 2px 0;
    margin-bottom: 6px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 22px;
}

.container {
    width: 80%;
    margin: auto;
    padding: 20px;
}

.pokemon-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.pokemon-card {
    background-color: #fff;
    padding: 10px;
    border: 4px solid #0a012d;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    animation: fadeIn 1s;
}

.pokemon-card img {
    width: 100px;
    height: 100px;
}

.pokemon-card:hover {
    transform: scale(1.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    width: 60%;
    max-width: 500px;
    text-align: center;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover, .close:focus {
    color: black;
    text-decoration: none;
}

.modal-content {
    animation: fadeIn 0.2s;
}

#load-more {
    animation: fadeIn 4s;
}

/* responsive design */

@media only screen and (max-width: 600px) {
    .pokemon-gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for smaller screens */
    }

    .pokemon-card img {
        width: 80px;
        height: 80px;
    }

    button {
        padding: 8px 15px;
        font-size: 14px;
    }

    .modal-content {
        width: 80%; /* wider modal on small screens */
        max-width: 90%; /* prevent from being too wide */
    }
}

@media only screen and (max-width: 1024px) {
    .pokemon-gallery {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for tablets */
    }

    .pokemon-card img {
        width: 90px;
        height: 90px;
    }

    button {
        padding: 9px 18px;
        font-size: 15px;
    }

    .modal-content {
        width: 70%; /* smaller modal */
    }
}