:root {
    --color-blue: #0000ff;
    --color-pink: #f300d1;
    --color-yellow: #ffe760;
    --color-green: #9df35c;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat Alternates', sans-serif;
    margin: 0;
    background-color: #fafafa;
    color: #222;
}

h1, h2, h3 {
    font-weight: 700;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    background-color: var(--color-blue);
}

nav a, nav button {
    color: white;
    text-decoration: none;
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 600;
}

nav a:hover, nav button:hover {
    color: var(--color-yellow);
}
nav button {
    font-size: inherit;
    font-family: inherit;
}
nav a, nav button {
    color: white;
    text-decoration: none;
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 600;
    font-size: inherit;
}
main {
    padding: 24px;
    padding-bottom: 100px;
    max-width: 900px;
    margin: 0 auto;
}

button, input[type="submit"] {
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 600;
    background-color: var(--color-pink);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}

button:hover, input[type="submit"]:hover {
    background-color: var(--color-blue);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: white;
    border: 2px solid var(--color-yellow);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: transform 0.15s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-green);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.product-price {
    font-weight: 600;
    color: var(--color-pink);
}

.messages {
    list-style: none;
    padding: 0;
}

.message {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 600;
}

.message.success {
    background-color: var(--color-green);
    color: #14401a;
}

.message.error {
    background-color: #ffd6d6;
    color: #7a1212;
}

.form-card {
    background-color: white;
    border-radius: 12px;
    padding: 24px 32px;
    max-width: 420px;
    margin: 40px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-card .helptext {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.form-card form p {
    margin-bottom: 16px;
}

.form-card label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #444;
}

.form-card input[type="text"],
.form-card input[type="password"],
.form-card input[type="email"],
.form-card input[type="url"],
.form-card input[type="date"],
.form-card textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 14px;
}

.form-card input:focus,
.form-card textarea:focus {
    outline: none;
    border-color: var(--color-blue);
}

.form-card .errorlist {
    color: #c00;
    list-style: none;
    padding: 0;
    font-size: 13px;
}

.form-card ul {
    list-style: none;
    padding: 0;
}

.form-card ul li {
    margin-bottom: 8px;
}

.form-card input[type="checkbox"] {
    margin-right: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.stat-card {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 6px solid transparent;
}

.stat-label {
    font-size: 14px;
    color: #777;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin: 0;
}

.stat-coins {
    border-top-color: var(--color-yellow);
}

.stat-meetings {
    border-top-color: var(--color-green);
}

.stat-streak {
    border-top-color: var(--color-pink);
}
.stat-last-meeting {
    border-top-color: var(--color-blue);
}

.profile-username {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.profile-avatar {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 3px solid var(--color-yellow);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 90px;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

.password-toggle:hover {
    color: var(--color-pink);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background-color: white;
    border-top: 2px solid #eee;
    padding: 8px 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #999;
    text-decoration: none;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 10px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-item:hover {
    color: var(--color-blue);
}

.nav-item.active {
    color: var(--color-blue);
    background-color: #eef0ff;
}

.nav-item-form button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #999;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
}

.nav-item-form button:hover {
    color: var(--color-pink);
}

.logout-form {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.logout-button {
    background-color: transparent;
    color: #c00;
    border: 2px solid #c00;
}

.logout-button:hover {
    background-color: #c00;
    color: white;
}

.history-title {
    margin-top: 32px;
    margin-bottom: 12px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    background-color: white;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.history-reason {
    font-weight: 600;
}

.history-date {
    font-size: 13px;
    color: #999;
}

.history-amount {
    font-weight: 700;
    font-size: 16px;
    min-width: 60px;
    text-align: right;
}

.history-amount.positive {
    color: var(--color-green);
}

.history-amount.negative {
    color: #c00;
}

.members-table {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.members-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
}

.members-row:last-child {
    border-bottom: none;
}

.members-header {
    font-weight: 700;
    background-color: #f5f5f5;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
}
.meet-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.meet-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    align-items: center;
    gap: 15px;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
}

.meet-row:last-child {
    border-bottom: none;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    color: #999;
    background-color: transparent;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.icon-btn.edit:hover {
    color: var(--color-blue);
    background-color: #eef0ff;
}

.icon-btn.delete:hover {
    color: #c00;
    background-color: #ffe0e0;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: #555;
}

.pagination a:hover {
    background-color: #eef0ff;
    color: var(--color-blue);
}

.pagination .current {
    background-color: var(--color-blue);
    color: white;
}

.pagination .disabled {
    color: #ccc;
}

.select2-container {
    width: 100% !important;
    font-family: 'Montserrat Alternates', sans-serif;
}

.select2-container--default .select2-selection--multiple {
    border: 2px solid #ddd;
    border-radius: 8px;
    min-height: 42px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--color-blue);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--color-pink);
    border: none;
    color: white;
    border-radius: 6px;
    padding: 2px 8px;
}

.select2-container--default .select2-selection__choice__remove {
    color: white;
    margin-right: 6px;
}

.select2-dropdown {
    border: 2px solid var(--color-blue);
    border-radius: 8px;
    font-family: 'Montserrat Alternates', sans-serif;
}

.select2-results__option {
    padding: 8px 12px;
    color: #222;
}

.select2-results__option--highlighted {
    background-color: var(--color-blue) !important;
    color: white !important;
}

.select2-search--dropdown .select2-search__field {
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'Montserrat Alternates', sans-serif;
}

.select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: var(--color-blue);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--color-blue) !important;
    border: none !important;
    border-radius: 6px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    color: white !important;
    padding: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white !important;
    border: none !important;
    background: transparent !important;
    order: -1;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--color-yellow) !important;
    background: transparent !important;
}

#page-loader {
    position: fixed;
    inset: 0;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

#page-loader.loader-hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #eee;
    border-top-color: var(--color-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== Landing hero ===== */
.landing-hero {
    position: relative;
    padding: 48px 20px 40px;
    text-align: center;
    overflow: hidden;
}


.landing-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-pink);
    margin-bottom: 12px;
}

.landing-title {
    position: relative;
    font-size: 42px;
    line-height: 1.15;
    margin: 0 0 16px;
    text-shadow: 3px 3px 0 var(--color-yellow);
}

.landing-subtitle {
    position: relative;
    max-width: 420px;
    margin: 0 auto 28px;
    color: #555;
    font-size: 15px;
}

.landing-cta {
    position: relative;
    display: inline-block;
    background-color: var(--color-pink);
    color: white;
    font-family: 'Montserrat Alternates', sans-serif;
    font-weight: 700;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 10px;
    box-shadow: 4px 4px 0 var(--color-blue);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.landing-cta:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--color-blue);
}

.landing-login-link {
    position: relative;
    display: block;
    margin-top: 16px;
    color: var(--color-blue);
    font-weight: 600;
    text-decoration: none;
}

.landing-login-link:hover {
    color: var(--color-pink);
}

/* ===== Landing path ===== */
.landing-path {
    padding: 20px 20px 40px;
}

.landing-path-title {
    text-align: center;
    margin-bottom: 28px;
}

.landing-path-track {
    display: flex;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.landing-path-item {
    background: white;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    width: 190px;
    box-shadow: 4px 4px 0 var(--step-color);
    border: 2px solid var(--step-color);
}

.landing-path-item h3 {
    font-size: 16px;
    margin: 12px 0 6px;
}

.landing-path-item p {
    font-size: 13px;
    color: #777;
    margin: 0;
}

.pip-badge {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border-radius: 8px;
    background: white;
    border: 3px solid var(--step-color);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 5px;
}

.pip-badge span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--step-color);
}

.pip-1 span:nth-child(1) { grid-area: 2 / 2; }

.pip-2 span:nth-child(1) { grid-area: 1 / 1; }
.pip-2 span:nth-child(2) { grid-area: 3 / 3; }

.pip-3 span:nth-child(1) { grid-area: 1 / 1; }
.pip-3 span:nth-child(2) { grid-area: 2 / 2; }
.pip-3 span:nth-child(3) { grid-area: 3 / 3; }

.pip-4 span:nth-child(1) { grid-area: 1 / 1; }
.pip-4 span:nth-child(2) { grid-area: 1 / 3; }
.pip-4 span:nth-child(3) { grid-area: 3 / 1; }
.pip-4 span:nth-child(4) { grid-area: 3 / 3; }

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    background-color: white;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.order-title {
    font-weight: 600;
    margin: 0 0 4px;
}

.order-date {
    font-size: 13px;
    color: #999;
    margin: 0;
}

.order-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.order-price {
    font-weight: 700;
    color: var(--color-pink);
}

.order-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

.order-status-processing {
    background-color: #ffe760;
    color: #6b5900;
}

.order-status-making {
    background-color: #9df35c;
    color: #2d5016;
}

.order-status-ready {
    background-color: #0000ff;
    color: white;
}

.order-status-done {
    background-color: #eee;
    color: #666;
}

.achievements-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease;
}

.achievements-card:hover {
    transform: translateY(-2px);
}

.achievements-card-icon {
    font-size: 32px;
}

.achievements-card-title {
    font-weight: 700;
    margin: 0 0 2px;
}

.achievements-card-count {
    font-size: 13px;
    color: #777;
    margin: 0;
}

.achievements-card-arrow {
    margin-left: auto;
    font-size: 20px;
    color: var(--color-blue);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.achievement-tile {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.achievement-tile.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.achievement-tile .achievement-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.poll-options label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.poll-options input {
    margin-right: 8px;
}

.poll-results-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.poll-result-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.poll-result-row:last-child {
    border-bottom: none;
}

.poll-result-count {
    font-weight: 700;
    color: var(--color-blue);
}

.poll-game-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-game-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.poll-game-row label {
    margin: 0;
    flex: 1;
}

.game-info-btn-small {
    background-color: var(--color-blue);
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.game-info-btn-small:hover {
    background-color: var(--color-pink);
}

.game-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    margin-bottom: 8px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
    font-weight: 600;
}

.game-description {
    font-size: 13px;
    color: #777;
    margin: 4px 0 0;
}

.poll-game-card {
    background-color: white;
    border: 2px solid var(--color-yellow);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.poll-game-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-green);
}

.poll-game-checkbox {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 22px;
    height: 22px;
    z-index: 2;
    cursor: pointer;
}

.poll-game-card:has(.poll-game-checkbox:checked) {
    border-color: var(--color-blue);
    background-color: #f0f4ff;
}

.poll-game-card h3 {
    margin: 8px 0;
    font-size: 15px;
}

.poll-game-card .game-info-btn-small {
    margin-top: auto;
    width: 100%;
}

@media (max-width: 480px) {
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .order-right {
        align-items: flex-start;
    }

    .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    }

    .achievement-tile {
        padding: 12px;
    }

    .achievement-tile .achievement-icon {
        font-size: 26px;
        margin-bottom: 4px;
    }

    .achievement-tile h3 {
        font-size: 14px;
        margin: 6px 0 4px;
    }

    .achievement-tile p {
        font-size: 12px;
    }
}

.game-info-btn {
    width: 100%;
    margin-top: 8px;
    background-color: var(--color-blue);
}

.game-info-btn:hover {
    background-color: var(--color-pink);
}

.game-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-modal-overlay.active {
    display: flex;
}

.game-modal {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.game-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    color: #999;
    font-size: 24px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
}

.game-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.game-modal-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .game-modal {
        padding: 20px;
        max-height: 85vh;
    }
}

.game-info-btn {
    width: 100%;
    margin-top: auto;
    background-color: var(--color-blue);
}

@media (max-width: 480px) {

    .landing-title {
        font-size: 32px;
    }

    .landing-path-item {
        width: 100%;
        max-width: 280px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    main {
        padding: 16px;
        padding-bottom: 120px;
    }

    .form-card {
        padding: 20px;
        margin: 20px auto;
    }

    .members-row {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        padding: 8px 10px;
        font-size: 13px;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .history-amount {
        text-align: left;
    }

     .bottom-nav {
        padding: 4px 0;
    }

    .nav-item span {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .nav-item {
        flex: 1;
        min-width: 0;
        padding: 4px 2px;
        gap: 2px;
    }

    .nav-item svg {
        width: 20px;
        height: 20px;
    }

    .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    }

    .product-card {
        background-color: white;
        border: 2px solid var(--color-yellow);
        border-radius: 12px;
        padding: 16px;
        text-align: center;
        transition: transform 0.15s ease;
        display: flex;
        flex-direction: column;
    }

    .product-card h3 {
        font-size: 14px;
        margin: 8px 0 4px 0;
    }

    .product-price {
        font-size: 13px;
    }

    .product-card button {
        padding: 6px 10px;
        font-size: 12px;
        width: 100%;
    }

    .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 28px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-last-meeting {
    border-top-color: var(--color-blue);
    }


    .stat-value-date {
        font-size: 22px;
    }

    .history-item {
        padding: 10px 12px;
    }

    .history-reason {
        font-size: 14px;
    }

}

