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

body {
    font-family: "Inconsolata", monospace;
    background-color: #0f111a;
    color: #f9f9f9;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 15vw;
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 2rem;
    }

    nav h1 {
        font-size: large;
        position: absolute;
        top: 1rem;
        left: 1rem;
    }

    .main-content {
        padding-top: 4rem;
    }

    .error-message {
        width: 60vw !important;
    }  

    .table-container {
        justify-content: flex-start !important;
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.nav-right {
    margin-left: auto;
}

.main-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 60vh;
    text-align: center;
}

.main-content p {
    margin-bottom: 1rem;
}

.main-content input {
    width: 25vw;
    min-width: 300px;
    max-width: 800px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #373e53;
    border-radius: 5px;
    background-color: #141824;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    color: #9fa6bc;
}

.main-content button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    color: #90d67f;
    border-color: rgb(37 176 3/24%);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color .3s ease;
    background-color: #1d2527;
}

.main-content button:hover {
    background-color: rgba(37,176,3,.2);
    border-color: rgb(167 223 153/23%);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results {
    margin-top: 1rem;
    text-align: center;
    min-width: 300px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4rem;
}

.results-placeholder {
    font-size: 1rem;
    line-height: 1.5;
}

.table-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; 
    gap: 1rem;
    padding-left: 20vw;
    padding-right: 20vw;
}

.data-table {
    width: auto;
    max-width: 800px;
    border-collapse: collapse;
    margin-top: 2rem;
    table-layout: auto;
    word-wrap: break-word;
}

.data-table th, .data-table td {
    border: 1px solid #373e53;
    padding: 10px;
    text-align: left;
    color: #9fa6bc;
}

.data-table th {
    background-color: #141824;
    border-bottom: 2px solid #373e53;
}

.data-table tr:nth-child(even) {
    background-color: #141824;
}

.error-message {
    color: #f48270;
    background-color: #241f25;
    padding: 1rem;
    border-radius: 0.5rem;
    display: none;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    width: 20vw; 
}

.no-style-link {
    text-decoration: none;
    color: inherit;
}

.visualizations {
    width: 90%;
    margin: 0 auto;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

#geo-map,
#combo-pie-chart,
#names-display {
    width: 360px;
    height: 260px;
}

#combo-pie-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 360px;
    height: 260px;
    margin: 0 auto;
}

.charts-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .visualizations {
        flex-direction: column;
        align-items: center;
    }

    .charts-container {
        flex-direction: column;
        gap: 5rem; /* Add spacing between the leaked names and pie chart */
    }

    #geo-map,
    #combo-pie-chart,
    #names-display {
        width: 100%;
        max-width: 300px;
        height: 260px;
    }
}

#names-display h3 {
    margin-bottom: 1rem;
}

#leaked-names-list {
    list-style-type: none;
    padding-left: 0;
    max-height: 260px;
    overflow-y: auto;
}

#leaked-names-list li {
    margin-bottom: 0.5rem;
    background-color: #1d2527;
    padding: 0.5rem;
    border-radius: 3px;
}

.category-container {
    margin-bottom: 2rem;
    text-align: center;
}

.category-container h3 {
    margin-bottom: 1rem;
}
