/* --- warsretreat.css --- */
/* This is the new main container styling for a centered layout */
#war-hub-hud {
    display: flex; /* Use flexbox for the main container */
    flex-direction: column; /* Stack the rows on top of each other */
    align-items: center; /* Center the rows horizontally */
    gap: 10px;
    width: 95%;
    max-width: 1200px;
    margin: 50px auto;
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid black;
    box-shadow: 1px 1px 2px black;
    margin-top: 5px;
}

/* New Flexbox containers for each row */
#top-widgets-container,
#bottom-widgets-container {
    display: flex;
    justify-content: center; /* Center widgets within the row */
    gap: 20px;
    width: 100%;
}

.hud-widget {
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid #00a8ff;
    padding: 15px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    flex: 1; /* Allow widgets to grow and take up equal space */
}

.hits-log-widget {
    flex: 3; /* Makes this widget twice as wide as the others in its row */
}

/* Keep these styles as they are, no changes needed */
.hud-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.1), transparent 50%, rgba(0, 168, 255, 0.1));
    z-index: -1;
    opacity: 0.2;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 168, 255, 0.5);
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
}

.header-label {
    color: #e0a71a;
}

.header-value {
    color: #ff0000;
    font-size: 0.9em;
}

.main-status-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.faction-score {
    font-size: 3em;
    font-weight: bold;
    color: #00a8ff;
    text-shadow: 0 0 5px #00a8ff;
}

.faction-vs {
    font-size: 1.5em;
    color: #aaa;
    font-weight: bold;
}

.war-progress-bar-container {
    display: flex;
    height: 20px;
    border: 1px solid #00a8ff;
    background-color: #000;
    margin-top: 10px;
}

.war-progress-bar-left, .war-progress-bar-right {
    height: 100%;
    transition: width 0.5s ease;
}

.war-progress-bar-left {
    background-color: #4CAF50;
}

.war-progress-bar-right {
    background-color: #e53935;
}

.chain-status-widget {
    text-align: center;
}

.chain-progress-bar-container {
    height: 10px;
    background-color: #333;
    border: 1px solid #00a8ff;
    margin: 10px 0;
}

.chain-progress-bar {
    height: 100%;
    background-color: #00aaff;
    transition: width 0.5s ease;
}

.chain-data {
    display: flex;
    justify-content: space-around;
}

.members-list {
    max-height: 424px;
    overflow-y: auto;
    border-top: 1px solid rgba(0, 168, 255, 0.3);
    padding-top: 10px;
}

.members-list::-webkit-scrollbar {
    width: 5px;
}
.members-list::-webkit-scrollbar-thumb {
    background-color: #00a8ff;
}

.member-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 168, 255, 0.1);
}

.member-status-offline {
    color: #888;
}

.member-status-online {
    color: #4CAF50;
}

/* Styling for the new log layout */
.hits-log-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.outgoing-log-column, .incoming-log-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.log-column-header {
    margin: 0 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 168, 255, 0.5);
    font-size: 1.1em;
    color: #e0a71a;
    text-align: center;
}

.hits-log {
    max-height: 400px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

.hits-log li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 168, 255, 0.1);
}

/* Media query for desktop layout */
@media (min-width: 1024px) {
    #war-hub-hud {
        flex-direction: column;
    }
    #top-widgets-container {
        justify-content: center;
    }
    #bottom-widgets-container {
        justify-content: center;
    }
    .hits-log-container {
        flex-direction: row;
    }
}

/* Media query for mobile layout */
@media (max-width: 1023px) {
    #top-widgets-container,
    #bottom-widgets-container {
        flex-direction: column;
    }
}