/* Color Palette & Font */
:root {
    --primary-color: #f7075f; /* EliteTokens pink/red */
    --secondary-color: #00bcd4; /* Accent blue */
    --bg-color-main: #121212;
    --bg-color-sidebar: #1a1a1a;
    --text-color: #f0f0f0;
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color-main);
    color: var(--text-color);
    line-height: 1.6;
}

/* ======================= APP LAYOUT (FLEXBOX) ======================= */
#app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ======================= SIDEBAR STYLES ======================= */
#sidebar {
    width: 250px;
    background-color: var(--bg-color-sidebar);
    padding: 30px 20px;
    position: sticky; /* Keeps it in place */
    top: 0;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
}

.logo {
    font-size: 1.8em;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 40px;
    text-align: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    color: var(--text-color);
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    font-size: 1em;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--primary-color);
    color: var(--bg-color-sidebar);
}

.nav-item.active {
    box-shadow: 0 0 15px rgba(247, 7, 95, 0.3);
}

.icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.user-info {
    margin-top: auto; /* Pushes user info to the bottom */
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    margin-top: 150px; /* Spacer */
}

.logout-btn {
    background-color: #333;
    color: var(--text-color);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}
.logout-btn:hover {
    background-color: var(--primary-color);
}


/* ======================= MAIN CONTENT STYLES ======================= */
#content {
    flex-grow: 1;
    padding: 30px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.main-header h1 {
    font-size: 2.5em;
    color: var(--text-color);
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--bg-color-main);
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background-color: #00e5ff;
    transform: translateY(-2px);
}

/* ======================= MATCH TABLE STYLES ======================= */
.match-list-container {
    background-color: var(--bg-color-sidebar);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#match-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    text-align: left;
}

#match-table th, #match-table td {
    padding: 15px;
    border-bottom: 1px solid #333;
}

#match-table th {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9em;
}

#match-table tr:hover {
    background-color: #222;
}

/* Status Indicators */
.status-active {
    color: #4CAF50; /* Green */
    font-weight: 500;
}
.status-starting {
    color: #FFC107; /* Yellow */
    font-weight: 500;
}
.status-full {
    color: #F44336; /* Red */
    font-weight: 500;
}

/* Join Button */
.join-btn {
    background-color: var(--primary-color);
    color: var(--bg-color-main);
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.join-btn:hover {
    background-color: #ff3377;
}

.join-btn:disabled, .join-btn.joined {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
}

/* Loading Status */
.status-message {
    text-align: center;
    padding: 20px;
    color: #aaa;
}

/* ======================= RESPONSIVENESS ======================= */
@media (max-width: 900px) {
    #sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    #app-wrapper {
        flex-direction: column;
    }
    .user-info {
        margin-top: 20px;
        padding-top: 0;
        border-top: none;
    }
    .main-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-header h1 {
        margin-bottom: 15px;
    }
    
    /* Hide some table columns on smaller screens */
    #match-table td:nth-child(2), #match-table th:nth-child(2) {
        display: none; 
    }
}