* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    overflow-y: disable;
    width: 100%;
    min-height:97vh; 
    background-image: url('https://i.pinimg.com/originals/4f/dc/a2/4fdca2986a1e23bae67fa9220aba661f.jpg');
    background-size: cover; /* Ensure the background image covers the entire viewport */
    background-repeat: no-repeat;
    background-position: center;
    overflow-y: disable;
}

/* Navbar Styles */
.navbar {
    display: flex;
    background-color: #970747;
    flex-wrap: wrap;
    padding: 2rem;
    justify-content: space-between;
    align-items: center; 
}

.navbar-controls {
    display: flex;
    width: 80%;
    gap: 5rem;
    justify-content: space-between;
    flex-wrap: wrap; 
}

.navbar-controls input {
    height: 2.5rem;
    width: 20rem;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    border: none;
}

.navbar-controls select {
    height: 2.5rem;
    border-radius: 5px;
    width: 14rem;
}

.navbar-controls button {
    width: 14rem;
    margin: 0;
}
.navbar-controls button:hover{
    background-color: beige;
    color: #970747;
    font-weight: 600;
}
/* Heading styles */
h1 {
    text-align: center;
    color: white;
}
.headding{
    font-size:3rem;
    margin: 2rem;
}

#back-button {
    margin-left:4rem;
}

/* Container for the country cards */
#country-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 4.8rem;
    padding: 3rem;
}

#load-more {
    background-color: white;
    color: black;
    padding: 0.9rem;
    margin-left: 3.7rem;
}
.country-card {
    padding: 15px;
    background-color: rgb(230, 220, 220);
    border-radius: 4px;
    cursor: pointer;
}

.country-card h2 {
    color: #970747;
}

button {
    display: inline-block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: white;
    color: black;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}
.country-card img {
    width: 100%;
    height: 18rem;
    border-radius: 5px;
}
/* CSS for the Details Page */
.allitems {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5rem;
    padding: 2rem;
}

.country-details {
    border-radius: 5px;
    width: 23rem;
    height: 40rem;
    padding: 1.4rem;
    margin-bottom: 1rem;
    background-color: rgb(255, 254, 253);
}

.country-details img {
    width: 100%;
    border-radius: 5px;
    height: 17rem;
}

.country-details p {
    font-size: 1.3rem;
    padding: 0.2rem;
}

#button-container {
    display: flex;
    gap: 30px;
    align-items: center;
}

.delete-btn {
    padding: 0.7rem;
    width: 10rem;
    background-color: black;
    color: white;
}

.liked {
    color: red;
}

/* Responsive Design for Smaller Devices */

/* Tablet (1024px and below) */
@media (max-width:1024px) {
    .navbar {
        padding: 1.5rem;
        justify-content: center; 
    }
    h1{
        margin-bottom:1.9rem;
    }
    .navbar-controls {
        width: 100%;
        gap: 3rem; 
        justify-content: space-evenly; 
    }
    .navbar-controls input,
    .navbar-controls select,
    .navbar-controls button {
        width: 100%; 
    }
    .navbar-controls input {
        height: 2.2rem; 
    }

    .navbar-controls select {
        height: 2.2rem;
    }

    .navbar-controls button {
        width: 100%;
        height: 3rem; 
    }
}
/* Mobile (Phone, 768px and below) */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start; 
    }

    .navbar-controls {
        width: 100%;
        gap: 2rem; 
        justify-content: center; 
        flex-wrap: wrap;
    }

    .navbar-controls input,
    .navbar-controls select,
    .navbar-controls button {
        width: 100%; 
    }

    .navbar-controls input,
    .navbar-controls select {
        height: 2rem; 
    }

    .navbar-controls button {
        height: 3.2rem; 
    }
}

/* Small Phones (480px and below) */
@media (max-width: 480px) {
    .navbar {
        padding: 0.8rem;
    }

    .navbar-controls {
        gap: 1.5rem;
    }

    .navbar-controls input,
    .navbar-controls select {
        height: 1.8rem; 
        font-size: 0.9rem; 
    }

    .navbar-controls button {
        height: 3rem; 
        font-size: 1rem; 
    }

    #country-list {
        gap: 2rem;
    }
}


@media (max-width: 1624px) and (min-width: 1025px) {
    .navbar {
        padding: 1.5rem;
        justify-content: center; 
    }

    h1 {
        margin-bottom: 1.9rem;
    }

    .navbar-controls {
        width: 100%;
        gap: 3rem; 
        display: flex;
        flex-direction: row;
    }

    .navbar-controls input,
    .navbar-controls select,
    .navbar-controls button {
        width: 20%; 
    }

    .navbar-controls input {
        height: 2.2rem;
    }

    .navbar-controls select {
        height: 2.2rem;
    }

    .navbar-controls button {
        width: 25%; 
        height: 2.5rem; 
    }
}
/* Pagination Container */
#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
  }
  
  #pagination button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
  }
    #pagination button:hover {
    background-color: #0056b3;
  }
  
  #pagination button:disabled {
    background-color: #d6d6d6;
    cursor: not-allowed;
    color: #b0b0b0;
  }
  
  #pagination button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
  }
  
