/* Dark Theme Applied to Everything */
body {
    background-color: #181818;
    color: #ccc;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #242424;
    color: #ccc;
}

table, th, td {
    border: 1px solid #444;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #333;
}

td {
    background-color: #242424;
}

button {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin: 10px;
}

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

/* Form Inputs, Selects, and Textareas */
input, select, textarea {
    background-color: #333;
    color: #ccc;
    border: 1px solid #444;
}

input:focus, select:focus, textarea:focus {
    border-color: #4CAF50;
}

/* Links */
a {
    color: #4CAF50;
}

a:hover {
    color: #81c784;
}

button:disabled {
    color: white;
    cursor: not-allowed;
    opacity: 0.4;
}

#results {
    display: none;
}

th:nth-child(2), td:nth-child(2) {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; 
}

.lowest-value {
    background-color: rgba(0, 128, 0, 0.5);
    color: white;
    font-weight: bold;
}

.highest-value {
    background-color: rgba(255, 0, 0, 0.5);
    color: white;
    font-weight: bold;
}

th {
    position: relative;
    padding-right: 20px;
}

.sort-arrow {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.sort-arrow.desc {
    border-top: none;
    border-bottom: 8px solid white;
}

.sort-arrow.asc {
    border-top: 8px solid white;
}

#columnStats {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0 30px 0;
}

#columnStats h3 {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 10px;
}

#columnStats table {
    width: 60%;
    min-width: 350px;
    font-size: 1.15em;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-collapse: collapse;
}

#columnStats th, #columnStats td {
    padding: 12px 18px;
    border: 1px solid gray;
    text-align: center;
}