#logo-box { /* Added styles to the logo's container */
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically (if height allows) */
    width: 100%; /* Ensure the container takes full width to allow centering */
    margin-bottom: 1%; /* Add some space below the logo */
}

.logo {
    width: 40%;
    max-width: 200px; /* Added max-width for better control on larger screens */
    height: auto;
}

.main-heading {
      /* Change font-family from "Libre Baskerville" */
    font-family: "Grenze Gotisch", cursive; 
    font-weight: 900;
    font-size: 300%;
    color: #525151;
    margin-bottom: 0.5rem; 
    text-align: center;
}

.sub-heading {
    font-size: 1.2rem;
    color: #666666; /* Slightly lighter sub-heading color */
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    background-color: #ffffff; /* White background for the container */
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); /* Softer shadow */
}

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

/* --- THEME UPDATE --- */
/* The old button classes now inherit from the new .btn class for consistent styling */
.log-in-button, .wotd-button, .associate-rivals-button {
    width: 100%;
}


.board {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 400px;
    padding: 10px;
    background-color: #e0e0e0; /* Light grey background for board */
    border-radius: 12px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1); /* Inner shadow for depth */
}

.row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.cell {
    width: 100%;
    padding-bottom: 100%; /* Makes cells square */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 2px solid #cccccc; /* Lighter border */
    border-radius: 8px;
    background-color: #ffffff; /* White default cell background */
    color: #333333; /* Dark text for cells */
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.1s ease;
    user-select: none;
}

.cell span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Cell states */
.cell.correct {
    background-color: #a2e0a0; /* Lighter green */
    border-color: #a2e0a0;
    color: #333333; /* Dark text on light green */
}

.cell.present {
    background-color: #ffe08a; /* Lighter yellow */
    border-color: #ffe08a;
    color: #333333; /* Dark text on light yellow */
}

.cell.absent {
    background-color: #b0b0b0; /* Lighter grey */
    border-color: #b0b0b0;
    color: #333333; /* Dark text on light grey */
}

.cell.typed {
    border-color: #888888; /* Darker border for typed cells */
    transform: scale(1.02); /* Slight scale effect when typed */
}

.message-box {
    min-height: 40px;
    text-align: center;
    font-size: 1.2rem;
    margin-top: 10px;
    color: #525151; /* Matched to main heading color for readability */
    font-weight: bold;
    padding: 5px 0;
}

/* Styles for Associate Rivals page */
.rival-card {
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    padding: 15px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rival-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.rival-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px; /* Space between header and progress bar */
}

.rival-card-info {
    display: flex;
    align-items: center;
}

.rival-card-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid var(--primary-orange);
    object-fit: cover;
}

.rival-card-name {
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
}

.rival-card-username {
    font-size: 0.9rem;
    color: #666;
    margin-top: 2px;
}


.add-message-success {
    color: #28a745;
    font-weight: bold;
}

.add-message-error {
    color: #dc3545;
    font-weight: bold;
}

/* Add Rival Section */
.add-rival-section {
    margin-bottom: 30px;
}

#addRivalForm {
    display: flex;
    gap: 10px;
}

#rivalPublicIdInput {
    flex-grow: 1;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* Rivals List */
#rivalsList {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 350px));
    justify-content: center;
}

/* Modal for Invites */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    position: relative;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

#invitesList {
    list-style: none;
    padding: 0;
}

.invite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.invite-actions {
    display: flex;
    gap: 10px;
}

.text-center {
    text-align: center;
}

.text-gray-500 {
    color: #999;
}


/* Responsive adjustments */
@media (max-width: 600px) {
    .main-heading {
          /* Change font-family from "Libre Baskerville" */
    font-family: "Grenze Gotisch", cursive; 
    font-weight: 900;
    font-size: 300%;
    color: #525151;
    margin-bottom: 0.5rem; 
    text-align: center;
    }
    .sub-heading {
        font-size: 1rem;
    }
    .cell {
        font-size: 1.5rem;
    }
    .message-box {
        font-size: 1rem;
    }
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
}
