body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(180deg, #ecf0f1 0%, #bdc3c7 100%);
    margin: 0;
    padding: 0 0 25px 0; /* Added bottom padding */
    color: #444;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
}

/* ...existing code... */

/* Updated smaller container */
.container {
    width: 90%;
    max-width: 800px; /* Adjust the max-width as needed */
    background: #f9f9f9; /* Adjust the background color as needed */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 0 auto; /* Center the container */
    text-align: left; /* Change to left alignment */
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Updated slimmer header nav */
/* =============================
   Modern Professional Navigation
   ============================= */
nav {
    --nav-bg: #1f2933; /* deep slate */
    --nav-accent: #2563eb; /* blue accent */
    --nav-accent-alt: #059669; /* green accent */
    --nav-text: #e5e7eb; /* light gray */
    --nav-text-dim: #9ca3af;
    --nav-hover: #2b3b47;
    --nav-border: #2a3a46;
    --nav-active-ring: #3b82f6;
    background: var(--nav-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--nav-border);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

nav .nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 4px 18px 6px 18px; /* compact vertical rhythm */
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Meta (top) bar */
.nav-meta {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    font-size: 11px;
    letter-spacing: .3px;
    color: var(--nav-text-dim);
    line-height: 1.2;
    font-weight: 500;
    white-space: nowrap;
}
.nav-meta span strong { color: var(--nav-text); font-weight: 600; }

/* Main menu */
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li { position: relative; }

.nav-menu a,
.nav-menu span.disabled-menu {
    --btn-pad-x: 10px;
    --btn-pad-y: 4px;
    --btn-radius: 5px;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: .2px;
    color: var(--nav-text);
    text-decoration: none;
    padding: var(--btn-pad-y) var(--btn-pad-x);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--btn-radius);
    background: transparent;
    border: 1px solid transparent;
    transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
    position: relative;
}

.nav-menu a:hover { background: var(--nav-hover); }

.nav-menu a:active { transform: translateY(1px); }

.nav-menu a.active {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.35), 0 0 0 1px rgba(59,130,246,0.4);
    border-color: rgba(59,130,246,0.5);
}

/* Accent variants for game links */
.nav-menu a.game-link {
    background: linear-gradient(135deg, #065f46 0%, #059669 80%);
    color: #ecfdf5;
    border: 1px solid #047857;
    font-weight: 600;
}
.nav-menu a.game-link:hover { background: linear-gradient(135deg, #047857 0%, #0d9f72 90%); }

/* Featured external link */
.nav-menu a.featured-link {
    background: linear-gradient(135deg, #92400e 0%, #b45309 70%);
    color: #fff7ed;
    border: 1px solid #b45309;
    font-weight: 600;
}
.nav-menu a.featured-link:hover { background: linear-gradient(135deg, #b45309 0%, #d97706 80%); }

/* Disabled state (maintenance mode) */
.nav-menu span.disabled-menu {
    cursor: not-allowed;
    opacity: .45;
    color: var(--nav-text-dim);
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.07);
}

/* NEW badge inside nav */
.nav-menu .new-badge {
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: .5px;
    position: relative;
    top: -1px;
}

/* Refined featured link style reset (overrides old) */
.featured-link { position: relative; }

/* Compact small-green-box (legacy class support) */
.small-green-box {
    background: linear-gradient(135deg, #065f46 0%, #059669 80%) !important;
    border: 1px solid #047857 !important;
    padding: 4px 10px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
}

/* Adjust spacing below nav to be tighter */
nav + * { margin-top: 12px; }

.progress-bar {
    position: relative;
    width: 100%;
    height: 30px;
    background: #ddd;
    border-radius: 16px;
    overflow: hidden;
    margin: 30px 0;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 16px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    padding: 0 10px; /* Add padding to ensure text is visible */
    box-sizing: border-box; /* Include padding in width calculation */
}

.progress-bar-text {
    position: absolute;
    width: 100%;
    text-align: center;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

h2 {
    color: #333;
    border-bottom: 3px solid #3498db;
    padding-bottom: 12px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 25px 0;
    box-shadow: 0 3px 7px rgba(0,0,0,0.1);
    max-width: 800px; /* Increased from 600px */
    margin: 25px auto; /* Center the form */
    text-align: center;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 80%;
    max-width: 700px; /* Increased from 300px */
    padding: 10px;
    margin: 10px 0;
    border: 2px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

input[type="submit"],
.start-button {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease, transform 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

input[type="submit"]:hover,
.start-button:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.rank {
    display: inline-block;
    padding: 8px 20px;
    background: #e74c3c;
    color: white;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gold-rank {
    background-color: #f9e79f;
    font-weight: 600;
}

.silver-rank {
    background-color: #d5d8dc;
    font-weight: 600;
}

.bronze-rank {
    background-color: #f5cba7;
    font-weight: 600;
}

.question-box {
    background: #f8f9fa;
    padding: 25px;
    border-left: 5px solid #3498db;
    margin: 25px 0;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.score {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Admin table styles */
.admin-table {
    width: 100%;
    max-width: 800px; /* Match dashboard content width */
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-left: auto; /* Center the table */
    margin-right: auto; /* Center the table */
    text-align: left; /* Align text to the left inside the table */
    table-layout: fixed; /* Fixed table layout */
    word-wrap: break-word; /* Allow word wrapping in cells */
}

.admin-table th,
.admin-table td {
    padding: 10px;
    font-size: 14px; /* Slightly smaller font */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis for overflow text */
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.admin-table th {
    background: #34495e;
    color: white;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 15px;
}

.admin-table tr:hover {
    background: #f5f6fa;
}

.delete-btn, .edit-btn {
    color: #e74c3c;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #e74c3c;
    border-radius: 7px;
    transition: background 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.delete-btn:hover, .edit-btn:hover {
    background: #e74c3c;
    color: white;
}

/* Admin form styles */
.admin-form {
    background: #f8f9fa;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.admin-form select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.admin-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    resize: vertical;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.admin-form input[type="submit"] {
    background: #3498db;
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 17px;
    transition: background 0.3s ease, transform 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.admin-form input[type="submit"]:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Updated smaller forms */
.auth-container,
.welcome-container {
    max-width: 600px; /* reduced from larger values */
    padding: 15px;    /* slightly reduced padding */
    margin: 20px auto;
}

/* Blitz Mode Subtitle Styling */
.welcome-text {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    padding: 25px 30px;
    border-left: 5px solid #3498db;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 25px 0 35px 0;
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
    text-align: justify;
    animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
}
    .auth-form input[type="email"] {
        width: 100%;
        padding: 12px;
        margin: 10px 0;
        border: 1px solid #bdc3c7;
        border-radius: 6px;
        box-sizing: border-box;
        font-size: 16px;
    }

    .auth-form label.checkbox-label {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 14px;
        color: #555;
        margin: 12px 0;
    }

.auth-link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ...existing code... */

/* Google authentication styling */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #777;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.auth-divider span {
    padding: 0 10px;
    font-size: 14px;
    text-transform: uppercase;
}

.social-auth {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.google-btn {
    width: 100%;
    height: 42px;
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 4px 0 rgba(0,0,0,.25);
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.google-btn:hover {
    box-shadow: 0 0 6px #4285f4;
}

.google-btn:active {
    background: #f5f5f5;
}

.google-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 2px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 1px;
}

.google-icon {
    width: 18px;
    height: 18px;
}

.btn-text {
    color: #757575;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
    margin-left: 24px;
    margin-right: 16px;
}

.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* ...existing code... */

.invitation-text {
    background-color: #f0f8ff;
    border: 1px solid #3498db;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* ...existing code... */

/* Blitz Reset Button Styling */
button[name="reset_blitz"],
button[type="submit"][name="reset_blitz"] {
    background: #e67e22;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

button[name="reset_blitz"]:hover,
button[type="submit"][name="reset_blitz"]:hover {
    background: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
}

#timer {
    font-size: 18px;
    color: red;
    margin-bottom: 20px;
    text-align: center;
}

/* ...existing code... */

.dashboard-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 800px; /* Limit maximum width */
    margin: 0 auto; /* Center the content */
}

.main-content {
    width: 100%; /* Take full width of parent */
}

.leaderboard {
    position: sticky;
    top: 30px; /* Adjusted top value */
    width: 300px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    height: fit-content;
}

.leaderboard-table {
    width: 100%; /* Adjust the width as needed */
    max-width: 100%; /* Ensure the table does not exceed the container width */
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff; /* Adjust the background color as needed */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.leaderboard-table th {
    background: #ecf0f1;
    font-weight: 600;
}

/* ...existing code... */

.page-layout {
    display: flex;
    justify-content: space-between; /* Changed to space-between */
    align-items: flex-start;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ...existing code... */

.leaderboard-bar {
    width: 100%;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.leaderboard-bar-content {
    display: inline-block;
    animation: scroll 20s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ...existing code... */

.user-form {
    text-align: left;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.user-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.user-form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    box-sizing: border-box;
}

.user-form input[type="submit"] {
    margin-top: 10px;
}

/* ...existing code... */

/* Updated smaller forms */
.user-form,
.bug-report-form {
    max-width: 600px; /* reduced from larger values */
    padding: 15px;    /* slightly reduced padding */
    margin: 20px auto;
}

.bug-report-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.bug-report-form input[type="text"],
.bug-report-form textarea,
.bug-report-form select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.bug-report-form input[type="text"]:focus,
.bug-report-form textarea:focus,
.bug-report-form select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bug-report-form input[type="submit"] {
    background: #3498db;
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 17px;
    transition: background 0.3s ease, transform 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.bug-report-form input[type="submit"]:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.success-message, .error-message {
    background-color: #d4edda; /* Success background */
    color: #155724; /* Success text color */
    border: 1px solid #c3e6cb; /* Success border */
    padding: 8px; /* Reduced padding */
    margin-bottom: 15px; /* Reduced margin */
    border-radius: 5px;
    font-size: 14px; /* Smaller font size */
}

.error-message {
    background-color: #f8d7da; /* Error background */
    color: #721c24; /* Error text color */
    border: 1px solid #f5c6cb; /* Error border */
}

/* ...existing code... */

.user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.user-card {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.user-card p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.user-card strong {
    font-size: 14px;
    color: #2c3e50;
}

.user-card em {
    font-size: 12px;
    color: #7f8c8d;
}

/* ...existing code... */

/* Horizontal online users box */
.online-users-box {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    padding: 2px 10px;
    justify-content: center;
    max-width: 100%; /* Use percentage of parent width */
    width: 800px; /* Set a fixed width */
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    box-sizing: border-box; /* Include padding in width calculation */
    margin: 0 auto; /* Center the box */
}

.online-users-box::-webkit-scrollbar {
    height: 3px;
}

.online-users-box::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.online-user {
    background: #4CAF50;
    color: #fff;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 9px;
    transition: background 0.3s ease;
    display: inline-block;
}

.online-user:hover {
    background: #45a049;
}

/* ...existing code... */

.notification {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px; /* Reduced padding */
    margin-bottom: 10px; /* Reduced margin */
    border-radius: 5px;
    font-size: 14px; /* Smaller font size */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ...existing code... */

.poll-container {
    width: 90%;
    max-width: 800px; /* Adjust the max-width as needed */
    margin: 20px auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.poll-container h4 {
    margin-bottom: 10px;
}

.poll-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.poll-container input[type="radio"] {
    margin: 5px 0;
    width: 20px; /* Increase the width of radio buttons */
}

.poll-container label {
    width: 100%; /* Make the label take full width */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 5px 0;
    background-color: #fff;
}

.poll-container input[type="submit"] {
    margin-top: 10px;
    padding: 10px 20px; /* Increase padding for the submit button */
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    width: 100%; /* Make the submit button take full width */
}

.poll-container input[type="submit"]:hover {
    background-color: #0056b3;
}

/* ...existing code... */

.global-notify {
    width: 90%;
    max-width: 800px; /* Adjust the max-width as needed */
    margin: 20px auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.notify-item {
    width: 100%;
    margin-bottom: 10px; /* Reduced margin */
    padding: 5px; /* Reduced padding */
    border-bottom: 1px solid #ddd;
    text-align: left;
}

/* Style for the "Editează" button */
.edit-button {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    width: 100px; /* Fixed width */
    height: 40px; /* Fixed height */
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
}

.edit-button:hover {
    background-color: #45a049;
}

/* Style for the "Șterge" button */
.delete-button {
    background-color: #e74c3c; /* Red */
    border: none;
    color: white;
    width: 100px; /* Fixed width */
    height: 40px; /* Fixed height */
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
}

.delete-button:hover {
    background-color: #c0392b;
}

/* Align buttons horizontally */
.button-container {
    display: flex;
    gap: 10px;
}

/* ...existing code... */

.learning-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.subtitle {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
    color: #333;
}

.columns-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.titles-column, .questions-column {
    width: 48%;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.titles-column h3, .questions-column h3 {
    text-align: center;
    margin-bottom: 20px;
}

.titles-column ul, .questions-column ul {
    list-style-type: none;
    padding: 0;
}

.titles-column li, .questions-column li {
    margin-bottom: 10px;
}

.titles-column li {
    font-weight: bold;
    margin-bottom: 15px;
}

.titles-column li span {
    font-weight: normal;
    color: #555;
    margin-left: 10px;
}

.titles-column a {
    text-decoration: none;
    color: #007BFF;
}

.titles-column a:hover {
    text-decoration: underline;
}

/* Full-width horizontal band footer */
.site-footer {
    background: #34495e;
    padding: 3px 0;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.2);
    font-size: 10px;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 1000;
    box-sizing: border-box; /* Include padding in width calculation */
    overflow-x: hidden; /* Prevent horizontal scrollbar */
}

/* Featured link styling */
.featured-link {
    color: #ffeb3b;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 5px;
    background-color: #4c7d3e;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.featured-link:hover {
    background-color: #5a9849;
    transform: scale(1.05);
}

.new-badge {
    font-size: 0.7em;
    background-color: #ff5722;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    position: absolute;
    top: -8px;
    right: -10px;
}

/* =======================================================
   Marketplace Hub & Community (builder / donate / etc.)
   ======================================================= */

.page-shell {
    width: min(1240px, calc(100% - 48px));
    margin: 24px auto 60px;
    padding: 0 12px;
}

.page-shell--wide {
    width: min(1320px, calc(100% - 32px));
}

@media (max-width: 768px) {
    .page-shell,
    .page-shell--wide {
        width: calc(100% - 24px);
        padding: 0;
    }
}

.page-hero {
    position: relative;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    color: #fff;
    padding: 32px clamp(18px, 4vw, 48px);
    border-radius: 20px;
    box-shadow: 0 18px 40px -24px rgba(17, 24, 39, 0.65);
    margin-bottom: clamp(24px, 6vw, 48px);
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 55%);
    pointer-events: none;
}

.page-hero--violet {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
}

.page-hero--emerald {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
}

.page-hero--sunrise {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #f0f9ff;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.page-hero__title {
    margin: clamp(12px, 3vw, 18px) 0 8px;
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.4px;
}

.page-hero__subtitle {
    max-width: 680px;
    margin: 0;
    font-size: clamp(1rem, 2.4vw, 1.15rem);
    line-height: 1.65;
    color: rgba(241, 245, 249, 0.9);
}

.page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.page-hero__actions .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease, background 0.2s ease;
}

.page-hero__actions .cta-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.26);
}

.section-heading {
    margin: 0 0 18px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.3px;
}

.section-heading span {
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
}

.alert {
    border-radius: 14px;
    padding: 16px 20px;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid transparent;
    box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.4);
}

.alert--success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border-color: #a7f3d0;
}

.alert--error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #b91c1c;
    border-color: #fecaca;
}

.alert--info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.metric-banner {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #fff;
    padding: 22px clamp(18px, 3vw, 30px);
    border-radius: 18px;
    box-shadow: 0 15px 32px -20px rgba(15, 23, 42, 0.55);
    margin-bottom: clamp(24px, 5vw, 40px);
    text-align: center;
}

.metric-banner__label {
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    opacity: 0.85;
}

.metric-banner__value {
    margin: 12px 0 4px;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 700;
}

.metric-banner__hint {
    font-size: 0.9rem;
    opacity: 0.85;
}

.card-grid {
    display: grid;
    gap: clamp(18px, 3vw, 28px);
}

.card-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid--market {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.card-grid--stretch {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: clamp(20px, 3vw, 28px);
    box-shadow: 0 16px 36px -28px rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card--bordered {
    border: 1px solid #e5e7eb;
}

.card--accent {
    position: relative;
    overflow: hidden;
}

.card--accent::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(59, 130, 246, 0.08));
    pointer-events: none;
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.card__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.card__subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 4px 0 0;
    line-height: 1.55;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #fff;
    background: #1f2937;
}

.chip--light {
    background: rgba(15, 23, 42, 0.08);
    color: #1f2937;
}

.chip--basic { background: linear-gradient(135deg, #6b7280, #9ca3af); }
.chip--medium { background: linear-gradient(135deg, #059669, #10b981); }
.chip--advanced { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.chip--rare { background: linear-gradient(135deg, #f59e0b, #f97316); color: #3f3f46; }

.resource-card {
    position: relative;
    border-top: 6px solid transparent;
    gap: 18px;
}

.resource-card--basic { border-color: #6b7280; }
.resource-card--medium { border-color: #059669; }
.resource-card--advanced { border-color: #2563eb; }
.resource-card--rare { border-color: #f59e0b; }

.resource-card__description {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
}

.resource-card__reference {
    font-size: 0.85rem;
    color: #9ca3af;
    font-style: italic;
}

.price-panel {
    background: #f9fafb;
    border-radius: 14px;
    padding: 16px;
}

.price-panel__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.92rem;
    color: #4b5563;
}

.price-panel__value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
}

.price-panel__base {
    text-decoration: line-through;
    color: #9ca3af;
}

.fluctuation-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.fluctuation-tag--positive { color: #dc2626; }
.fluctuation-tag--negative { color: #059669; }
.fluctuation-tag--neutral { color: #6b7280; }

.insight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 520px) {
    .insight-grid {
        grid-template-columns: 1fr;
    }
}

.insight-card {
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
    background: #fff;
}

.insight-card.is-positive { border-left: 3px solid #10b981; }
.insight-card.is-neutral { border-left: 3px solid #6b7280; }

.insight-card__icon {
    font-size: 1.4rem;
}

.insight-card__label {
    margin: 6px 0 2px;
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.insight-card__value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
}

.insight-card__hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

.insight-hint {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #9a3412;
}

.affordable-info {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.9rem;
    text-align: center;
}

.form-inline {
    display: flex;
    gap: 12px;
    align-items: center;
}

.form-inline input[type="number"] {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
}

.form-inline button,
.primary-btn {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-inline button:hover,
.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px -16px rgba(16, 185, 129, 0.8);
}

.inventory-empty,
.empty-state {
    text-align: center;
    padding: clamp(32px, 6vw, 48px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 34px -28px rgba(15, 23, 42, 0.35);
}

.empty-state__icon {
    font-size: clamp(3rem, 8vw, 4.4rem);
    opacity: 0.45;
    margin-bottom: 14px;
}

.empty-state__title {
    font-size: 1.4rem;
    margin: 0 0 10px;
    color: #1f2937;
}

.empty-state__text {
    color: #6b7280;
    margin-bottom: 22px;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: clamp(32px, 7vw, 48px);
}

.page-actions a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    color: #1f2937;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-actions a:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -22px rgba(31, 41, 55, 0.7);
}

.page-actions a.is-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: rgba(37, 99, 235, 0.4);
    color: #fff;
}

.page-actions a.is-success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #fff;
}

.page-actions a.is-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: #3f3f46;
}

.progress-track {
    background: #f3f4f6;
    border-radius: 999px;
    height: 22px;
    overflow: hidden;
    position: relative;
}

.progress-track__bar {
    height: 100%;
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 18px;
    transition: width 0.4s ease;
}

.progress-track__bar.is-basic { background: linear-gradient(90deg, #6b7280, #9ca3af); }
.progress-track__bar.is-medium { background: linear-gradient(90deg, #059669, #10b981); }
.progress-track__bar.is-advanced { background: linear-gradient(90deg, #2563eb, #1d4ed8); }
.progress-track__bar.is-rare { background: linear-gradient(90deg, #f59e0b, #f97316); color: #3f3f46; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(16px, 3vw, 24px);
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 14px 28px -26px rgba(15, 23, 42, 0.45);
}

.stat-card__icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.stat-card__value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 4px;
}

.stat-card__label {
    font-size: 0.9rem;
    color: #6b7280;
}

.data-table-wrapper {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 34px -28px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table thead {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
}

.data-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr.is-current {
    background: #fff7ed;
    font-weight: 600;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

.infobox {
    background: #edf2ff;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    padding: 16px 18px;
    color: #312e81;
}

.info-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.info-button:hover,
.info-button:focus-visible {
    background: #1d4ed8;
    outline: none;
}

.resource-info-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.resource-info-modal.is-open {
    display: flex;
}

.resource-info-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.resource-info-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 92%);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 28px 60px -32px rgba(15, 23, 42, 0.65);
    padding: clamp(24px, 4vw, 34px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.resource-info-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: #475569;
    cursor: pointer;
}

.resource-info-close:hover,
.resource-info-close:focus-visible {
    color: #1f2937;
    outline: none;
}

.resource-info-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
}

.resource-info-verse {
    margin: 0;
    font-size: 1rem;
    color: #4b5563;
    font-weight: 600;
}

.resource-info-quote {
    margin: 0;
    padding: 14px 18px;
    border-left: 4px solid #6366f1;
    background: #f5f3ff;
    color: #4338ca;
    font-style: italic;
    border-radius: 12px;
}

.resource-info-section {
    background: #f9fafb;
    border-left: 3px solid #6366f1;
    border-radius: 12px;
    padding: 12px 16px;
}

.resource-info-section h4 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.resource-info-section p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
}

body.modal-open {
    overflow: hidden;
}
