/* Page background */
body {
    background-color: #333333; 
    color: #ffffff;
    margin: 0;
    padding: 0;
}



/* ---------------------------------------------------
   General Container
--------------------------------------------------- */
#container {
    max-width: 1200px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* ---------------------------------------------------
   API Key Section
--------------------------------------------------- */
#apikey-container input,
#war-select-container select {
    background-color: #4B4B4B !important;
    color: #ffffff !important;
    border: 1px solid #555;   
    padding: 5px 8px;
    font-size: 14px;
    border-radius: 3px;
    outline: none;
}

/* change border color on focus */
#apikey-container input:focus,
#war-select-container select:focus {
    background-color: #4B4B4B !important;
    color: #ffffff !important;
    border-color: #74C0FC;
}

/* Maintain background/text color on hover */
#apikey-container input:hover,
#war-select-container select:hover {
    background-color: #4B4B4B !important;
    color: #ffffff !important;
}

/* Keep button style consistent */
#apikey-container button {
    background-color: #4B4B4B;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 5px 8px;
}

#apikey-container button:hover {
    background-color: #5c5c5c;
}

/* ---------------------------------------------------
   Loading Indicator
--------------------------------------------------- */
#loading-indicator {
    color: #4CAF50; 
    font-weight: bold;
    margin-top: 10px;
}

/* ---------------------------------------------------
    Custom End Time Section
--------------------------------------------------- */
#custom-end-time-container {
    margin-top: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

#custom-end-time-container input[type="datetime-local"] {
    background-color: #4B4B4B !important;
    color: #ffffff !important;
    border: 1px solid #555;    
    padding: 5px 8px;
    font-size: 14px;
    border-radius: 3px;
    outline: none;
    margin-left: 10px;
}

#custom-end-time-container input[type="datetime-local"]:focus {
    border-color: #74C0FC;
}

#custom-end-time-container input[type="datetime-local"]:hover {
    background-color: #4B4B4B !important;
}

#custom-end-time-container label {
    margin-right: 5px;
}

#custom-start-time-container input[type="datetime-local"] {
    background-color: #4B4B4B !important;
    color: #ffffff !important;
    border: 1px solid #555;
    padding: 5px 8px;
    font-size: 14px;
    border-radius: 3px;
    outline: none;
    margin-left: 10px;
}

#custom-start-time-container input[type="datetime-local"]:focus {
    border-color: #74C0FC;
}

#custom-start-time-container input[type="datetime-local"]:hover {
    background-color: #4B4B4B !important;
}

#custom-start-time-container label {
    margin-right: 5px;
}

#custom-end-datetime {
    display: none;
}

/* ---------------------------------------------------
   War Dropdown Section
--------------------------------------------------- */
#war-select-container {
    margin-bottom: 20px;
}

#war-select-container label {
    margin-right: 10px;
}

#war-select-container select {
    padding: 5px 8px;
    font-size: 14px;
}

#war-select-container button {
    background-color: #4B4B4B;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 5px 8px; 
}

#war-select-container button:hover {
    background-color: #5c5c5c;
}

/* ---------------------------------------------------
   Results Table Section
--------------------------------------------------- */
#results-container h3 {
    margin-bottom: 10px;
}

/* Table styling */
#tracker table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #333333; 
    color: #ffffff; 
}

#tracker th, #tracker td {
    border: 1px solid #555;
    padding: 4px 8px;
    text-align: left;
}

#tracker th {
    background-color: #333333;
    color: #74C0FC; 
    cursor: pointer;
    user-select: none;
    position: relative;
}

/* Sort arrows */
#tracker th.sort-asc::after,
#tracker th.sort-desc::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
}

#tracker th.sort-asc::after {
    border-bottom-color: #ffffff;
}

#tracker th.sort-desc::after {
    border-top-color: #ffffff;
}

/* Striped rows */
#tracker tr:nth-child(even) {
    background-color: #4B4B4B;
}

#tracker tr:hover {
    background-color: #5c5c5c; 
}

/* Style for the totals row */
.total-row {
    background-color: #2C2C2C !important; 
    font-weight: bold;
}
.total-row td {
    color: #74C0FC; 
    border-top: 2px solid #74C0FC !important;
}
#tracker tr:nth-child(even).total-row {
    background-color: #2C2C2C !important;
}
#tracker tr:hover.total-row {
    background-color: #2C2C2C !important; 
}