.hw-wrap {
    max-width: 1100px;

    margin: 28px auto;

    padding: 22px;

    background: linear-gradient(
            180deg,
            rgba(255,255,255,0.96),
            rgba(248,249,250,0.98)
    );

    border-radius: 18px;

    box-shadow: 0 10px 30px rgba(16,24,40,0.12);

    display: flex;
    flex-direction: column;

    gap: 18px;

    color: #0f172a;

    width: calc(100% - 24px);
}

/* =========================
   HEADER
========================= */

.hw-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 16px;

    flex-wrap: wrap;
}

.hw-title {
    min-width: 0;
}

.hw-title h2 {
    margin: 0;

    font-size: 20px;

    line-height: 1.3;

    word-break: break-word;
}

.hw-sub {
    font-size: 13px;

    color: #6b7280;

    margin-top: 4px;

    line-height: 1.5;
}

/* =========================
   CONTROLS
========================= */

.hw-controls {
    display: flex;
    align-items: center;

    gap: 12px;

    flex-wrap: wrap;
}

.opp-btn {
    width: 44px;
    height: 44px;

    border-radius: 10px;

    border: none;

    background: linear-gradient(180deg,#111827,#0b1220);

    color: #fff;

    cursor: pointer;

    flex-shrink: 0;

    transition: 0.2s ease;
}

.opp-btn:hover {
    transform: translateY(-2px);
}

.opp-chip {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 8px 12px;

    border-radius: 12px;

    background: linear-gradient(
            180deg,
            #ffffff,
            #fbfdff
    );

    min-width: 0;

    flex-wrap: wrap;
}

/* =========================
   GRID
========================= */

.cards-grid {
    display: grid;

    grid-template-columns: repeat(
        auto-fill,
        minmax(220px, 1fr)
    );

    gap: 18px;
}

/* =========================
   GAME CARD
========================= */

.game-card {
    padding: 14px;

    border-radius: 14px;

    min-height: 120px;

    background: linear-gradient(
            180deg,
            #ffffff,
            #fbfcff
    );

    border: 1px solid rgba(2,6,23,0.04);

    box-shadow: 0 8px 20px rgba(2,6,23,0.05);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    gap: 14px;

    transition: 0.2s ease;
}

.game-card:hover {
    transform: translateY(-3px);
}

.game-card.res-win {
    border-left: 6px solid #10b981;
}

.game-card.res-lose {
    border-left: 6px solid #f59e0b;
}

.game-card.res-draw {
    border-left: 6px solid #3b82f6;
}

/* =========================
   CARD TOP / FOOTER
========================= */

.card-top,
.card-footer {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 8px;

    flex-wrap: wrap;
}

/* =========================
   META
========================= */

.meta-row {
    display: flex;

    gap: 12px;

    align-items: center;

    flex-wrap: wrap;

    color: #475569;

    font-size: 14px;
}

/* =========================
   BUTTONS
========================= */

.view-btn {
    padding: 8px 12px;

    border-radius: 10px;

    border: none;

    background: linear-gradient(
            180deg,
            #111827,
            #0b1220
    );

    color: #fff;

    cursor: pointer;

    font-weight: 600;

    transition: 0.2s ease;
}

.view-btn:hover {
    transform: translateY(-2px);
}

.primary {
    padding: 10px 14px;

    border-radius: 10px;

    background: linear-gradient(
            90deg,
            #06b6d4,
            #3b82f6
    );

    border: none;

    color: white;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s ease;
}

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

.pg-btn {
    padding: 8px 12px;

    border-radius: 8px;

    border: none;

    background: #f3f4f6;

    cursor: pointer;

    transition: 0.2s ease;
}

.pg-btn:hover {
    background: #e5e7eb;
}

/* =========================
   FOOTER
========================= */

.hw-footer {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 12px;

    flex-wrap: wrap;
}

.pager {
    display: flex;

    align-items: center;

    gap: 12px;

    flex-wrap: wrap;
}

/* =========================
   EFFECTS
========================= */

.pulse {
    box-shadow: 0 0 10px rgba(255,255,255,0.25);
}

/* =========================
   TABLET
========================= */

@media (max-width: 768px) {

    .hw-wrap {
        margin: 18px auto;

        padding: 18px;

        border-radius: 16px;
    }

    .hw-title h2 {
        font-size: 18px;
    }

    .cards-grid {
        grid-template-columns: repeat(
            auto-fill,
            minmax(200px, 1fr)
        );

        gap: 14px;
    }

    .game-card {
        padding: 12px;
    }

    .hw-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .pager {
        justify-content: center;
    }

    .primary {
        width: 100%;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 520px) {

    .hw-wrap {
        width: calc(100% - 12px);

        padding: 14px;

        border-radius: 14px;

        margin: 12px auto;
    }

    .hw-header {
        flex-direction: column;
        align-items: stretch;
    }

    .hw-controls {
        width: 100%;

        justify-content: space-between;
    }

    .opp-chip {
        flex: 1;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .game-card {
        min-height: unset;
    }

    .card-top,
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-btn,
    .primary,
    .pg-btn {
        width: 100%;
    }

    .pager {
        width: 100%;

        flex-direction: column;
    }

    .hw-title h2 {
        font-size: 17px;
    }

    .hw-sub {
        font-size: 12px;
    }
}

/* =========================
   SMALL DEVICES
========================= */

@media (max-width: 360px) {

    .hw-wrap {
        padding: 12px;
    }

    .hw-title h2 {
        font-size: 15px;
    }

    .opp-btn {
        width: 40px;
        height: 40px;
    }

    .view-btn,
    .primary,
    .pg-btn {
        font-size: 13px;
        padding: 10px;
    }
}