body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-color: #000;
    color: #fff;
}

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

header {
    text-align: center;
    margin-bottom: 20px;
}

#countryList {
    display: flex;
    flex-wrap: wrap;
}

.countryCard {
    width: 200px;
    margin: 10px;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.countryImage {
    max-width: 100%;
    border-radius: 4px;
}

.countryName {
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

/* Styles for the modal */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.modal-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
    border-radius: 12px; /* Added border radius */
    background-color: #1a1a1a; /* Dark background color */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px; /* Added padding for content */
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #fff;
}

.countryDetails {
    margin-top: 20px;
    font-size: 16px;
    text-align: left; /* Align text to the left */
    color: #fff; /* Text color */
}

/* Hover effect for country cards */
.countryCard:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
}

/* Styles for the top navigation bar */
.top-nav {
    background-color: #001f3f;
    overflow: hidden;
    border-radius: 12px;
}

.top-nav a {
    float: left;
    display: block;
    color: #fff;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.top-nav a:hover {
    background-color: #003366;
}

.top-nav a.active {
    background-color: #004080;
}

/* Styles for the filter section */
#filters {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#filters label {
    margin-right: 10px;
    color: #fff;
}

#filters select,
#filters input[type="text"] {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    background-color: #001f3f;
    color: #fff;
    margin-right: 20px;
}

#filters select:focus,
#filters input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px #004080;
}

/* Background colors based on political philosophy */
.countryCard.Communist {
    background-color: #8B0000; /* Dark Red */
}

.countryCard.Monarchy {
    background-color: #006400; /* Dark Green */
}

.countryCard.Capitalist {
    background-color: #00008B; /* Dark Blue */
}
.countryCard.Imperialist {
    background-color: #cccc00;
}
.countryCard.Union {
    background-color: #ff9900;
}
#filters select#sortBy {
    padding: 8px;
    border: none;
    border-radius: 4px;
    background-color: #001f3f;
    color: #fff;
}
.countryImage-top {
    max-height: 200px;
    border-radius: 8px 8px 0 0; /* Apply border radius only to the top corners */
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%;
}