:root {
    --primary-color: #BB0000;
    --secondary-color: #666666;
    --success-color: #dff0d8;
    --info-color: #d9edf7;
    --warning-color: #fcf8e3;
    --danger-color: #f2dede;
    --orange-color: #ffe0cb;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f7f7f7;
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

.content-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.leaderboard, .recent-flags {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* Additional styles for the leaderboard clickable names */
#leaderboard-table a {
    color: #000000;
    text-decoration: none;
}

#leaderboard-table a:hover {
    text-decoration: underline;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: var(--primary-color);
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

ul {
    list-style-type: none; 
    padding: 0;
    margin: 0;
    max-height: 400px; 
    overflow-y: auto; 
}

li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

li:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.submit-flag-button {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 30px 0;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
}

.submit-flag-button:hover {
    background-color: var(--secondary-color);
}

.flag-item {
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.flag-item:last-child {
    margin-bottom: 0;
}

.flag-item strong {
    font-weight: bold;
}

.flag-item small {
    display: block;
    margin-top: 5px;
    color: #666;
}

.flag-grid {
    display: grid;
    grid-template-columns: 75% 25%; /* Allocate 75% for flag details and 25% for the veto button */
    gap: 10px; /* Adjust the gap between columns as needed */
    align-items: center; /* Align items vertically in the center */
}

.flag-actions {
    text-align: right; /* Align the veto button to the right */
}

.veto-button {
    width: 90%; /* Set the width to 100% of the parent container */
    height: 100%; /* Set the height to 90% of the parent container */
    padding: 24px 12px;
    background-color: var(--primary-color); /* Use the primary color variable */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px; /* Add some space above the button */
    margin-right: 5px; /* Add some space to the left of the button */
    outline: none; /* Remove the outline to match other buttons */
}

.veto-button-passed {
    width: 90%; /* Set the width to 100% of the parent container */
    height: 100%; /* Set the height to 90% of the parent container */
    padding: 24px 12px;
    background-color: #00BB00; /* Use the primary color variable */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px; /* Add some space above the button */
    margin-right: 5px; /* Add some space to the left of the button */
    outline: none; /* Remove the outline to match other buttons */
}

.veto-button:hover {
    background-color: var(--secondary-color); /* Darken the primary color on hover */
}

.flag-green { background-color: var(--success-color); }
.flag-blue { background-color: var(--info-color); }
.flag-yellow { background-color: var(--warning-color); }
.flag-orange { background-color: var(--orange-color); }
.flag-red { background-color: var(--danger-color); }

.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: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.submit-flag-form {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.submit-flag-form label {
    font-weight: bold;
    margin-bottom: 5px;
}

.submit-flag-form input,
.submit-flag-form select,
.submit-flag-form textarea {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.submit-flag-form textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-flag-form button[type="submit"] {
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.submit-flag-form button[type="submit"]:hover {
    background-color: var(--secondary-color);
}

.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    margin-bottom: 15px;
}

.file-upload-wrapper .upload-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.file-upload-wrapper .upload-btn:hover {
    background-color: var(--secondary-color);
}

.file-upload-wrapper #file-chosen {
    margin-left: 10px;
    font-size: 16px;
}

.file-upload-wrapper .file-upload-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

@media (max-width: 768px) {
    .content-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .submit-flag-button {
        margin: 20px 0;
    }

    .modal-content {
        margin: 30% auto;
    }
}