/* --- Global Base Styles (For all pages) --- */
body {
    margin: 0;
    font-family: Verdana, Arial, sans-serif;
    background-color: #c9d4e4; /* Page Background Color */
    color: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Header Styles --- */
header {
    background-color: #0074cc; /* Header Blue */
    color: #fff;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.logo {
    height: 40px;
}

.topbar-username {
    flex-grow: 1;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    color: #fff;
}

.currency {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.currency span, .currency a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* --- Top Navigation Bar Styles --- */
.main-nav {
    background-color: #0066b3; 
    color: #fff;
    display: flex;
    justify-content: center;
    padding: 0 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    flex-wrap: wrap; 
    z-index: 10;
}

.nav-link, .nav-icon-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 12px 18px;
    transition: background-color 0.2s, color 0.2s;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.nav-link:hover, .nav-icon-link:hover {
    background-color: #0044cc;
}

.nav-link.active {
    background-color: #0044cc;
    border-bottom: 3px solid #b3d1f0; 
}

/* --- Main Content Area and Cards --- */
.container {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    align-items: center;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    background: #b3d1f0; 
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.profile-section, .recommend {
    width: 100%;
    max-width: 800px; /* Default width */
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    box-sizing: border-box;
    text-align: left;
}

.games-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.game-card {
    width: 180px;
    height: 180px;
    background: #fff;
    border: 4px solid #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Message Area for Feedback */
#message-area { 
    padding: 10px; 
    background-color: #ffe0b2; 
    border: 1px solid #ffb74d; 
    border-radius: 5px; 
    color: #333; 
    display: none; 
    width: 100%; 
    max-width: 600px; 
    text-align: left; 
    box-sizing: border-box; 
    margin-top: 20px;
}

/* Footer Styles */
.footer {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    color: #333;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* --- Profile/Develop Hub Tab Styles --- */
.hub-tabs {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 800px; 
    margin-bottom: -1px; 
}

.hub-tab-link {
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    color: #0074cc;
    background-color: #e6e6e6;
    border: 1px solid #c0c0c0;
    border-bottom: none;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
}

.hub-tab-link.active-tab {
    background-color: #b3d1f0;
    color: #000;
    border-color: #c0c0c0;
    border-bottom: 1px solid #b3d1f0;
}

.tab-content {
    background: #fff;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    border: 1px solid #c0c0c0;
    border-radius: 0 5px 5px 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

/* --- Catalog/Shop Styles --- */
.shop-container {
    display: flex;
    width: 100%;
    max-width: 1000px; 
    align-items: flex-start;
    gap: 20px;
    box-sizing: border-box;
}

.shop-sidebar {
    width: 200px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.category-list a {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 8px 0;
    font-size: 15px;
    transition: color 0.2s;
}

.shop-main-content {
    flex-grow: 1;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    text-align: center;
}

/* --- Authentication Form Styles (Merged from embedded styles) --- */
.auth-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background-color: #c9d4e4; 
}
.auth-form {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.auth-form input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}
.auth-form button {
    width: 90%;
    padding: 12px;
    margin-top: 15px;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.auth-form button[type="submit"] {
    background-color: #0074cc; /* Default for sign in */
}
.auth-form a {
    color: #0074cc;
    text-decoration: none;
    font-weight: bold;
}

/* --- Table Styles (Used for Wallet/Help) --- */
.content-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}
.content-table th, .content-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}
.content-table th {
    background-color: #0074cc;
    color: white;
    font-weight: bold;
}
.jix-value { color: #cc4400; font-weight: bold; }
.johnbux-value { color: #0074cc; font-weight: bold; }


/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .profile-section, .recommend, .tab-content, .shop-container { 
        max-width: 100%;
    }
    .shop-container {
        flex-direction: column;
    }
    .shop-sidebar {
        width: 100%;
    }
}