/* Games Page Styles - matching Events theme */
html {
    scroll-behavior: smooth;
}

.games-page {
    width: min(100%, 72rem);
    margin: 1.5rem auto 0;
}

.games-hero {
    margin-bottom: 1.75rem;
}

.games-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.games-hero p {
    color: var(--muted);
    line-height: 1.65;
}

/* Sections */
.games-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.games-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
    flex-shrink: 0;
}

.games-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.games-section-header h2 {
    margin: 0;
}

.game-status--header {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

.games-section-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-count {
    color: #f2d3c4;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Search */
.games-table-tools {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.games-table-search-block {
    display: grid;
    gap: 0.35rem;
}

.games-table-search-label {
    font-size: 0.8rem;
    color: #f2d3c4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.games-table-search {
    width: min(100%, 24rem);
    min-height: 2.5rem;
    padding: 0.62rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 160, 76, 0.25);
    color: var(--text);
    background: linear-gradient(160deg, rgba(22, 14, 28, 0.84), rgba(44, 19, 36, 0.76));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
    appearance: none;
}

.games-table-search:focus {
    outline: 2px solid rgba(157, 78, 221, 0.45);
    border-color: rgba(157, 78, 221, 0.55);
}

/* Overview Stats */
.games-overview {
    display: grid;
    gap: 0.35rem;
}

.games-overview-label {
    font-size: 0.8rem;
    color: #f2d3c4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.games-overview-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.games-overview-stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.games-overview-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
}

.games-overview-count--active {
    background: linear-gradient(135deg, rgba(46, 179, 78, 0.95), rgba(97, 215, 118, 0.9));
}

.games-overview-count--maybe {
    background: linear-gradient(135deg, rgba(43, 104, 255, 0.95), rgba(92, 164, 255, 0.92));
}

.games-overview-count--casual {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.95), rgba(197, 138, 249, 0.9));
}

.games-overview-count--completed {
    background: linear-gradient(135deg, rgba(42, 132, 192, 0.95), rgba(97, 175, 232, 0.9));
}

.games-overview-count--abandoned {
    background: linear-gradient(135deg, rgba(192, 42, 42, 0.95), rgba(232, 97, 97, 0.9));
}

.games-overview-text {
    font-size: 0.875rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

/* Quick Navigation */
.games-quick-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(175deg, rgba(20, 12, 27, 0.5), rgba(34, 15, 34, 0.4));
    border: 1px solid rgba(255, 160, 76, 0.15);
}

.games-quick-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    transition: transform 150ms ease, box-shadow 150ms ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.games-quick-nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.games-quick-nav-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.games-quick-nav-label {
    letter-spacing: 0.02em;
}

.games-quick-nav-item--active {
    background: linear-gradient(135deg, rgba(46, 179, 78, 0.9), rgba(97, 215, 118, 0.85));
}

.games-quick-nav-item--maybe {
    background: linear-gradient(135deg, rgba(43, 104, 255, 0.9), rgba(92, 164, 255, 0.85));
}

.games-quick-nav-item--casual {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.9), rgba(197, 138, 249, 0.85));
}

.games-quick-nav-item--completed {
    background: linear-gradient(135deg, rgba(42, 132, 192, 0.9), rgba(97, 175, 232, 0.85));
}

.games-quick-nav-item--abandoned {
    background: linear-gradient(135deg, rgba(192, 42, 42, 0.9), rgba(232, 97, 97, 0.85));
}

/* Table */
.games-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid rgba(255, 160, 76, 0.2);
    border-radius: 1rem;
    background: linear-gradient(175deg, rgba(20, 12, 27, 0.92), rgba(34, 15, 34, 0.88));
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.26);
    flex: 1;
    min-height: 0;
}

.games-table {
    width: 100%;
    min-width: 20rem;
    border-collapse: collapse;
}

.games-table thead th {
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid rgba(255, 160, 76, 0.2);
    background: rgba(255, 255, 255, 0.03);
    text-align: left;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f2d3c4;
}

.games-table tbody td {
    padding: 0.78rem 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--muted);
    vertical-align: middle;
}

.games-table tbody tr:last-child td {
    border-bottom: 0;
}

.game-name-cell {
    color: #ffe9de;
    font-weight: 500;
}

.games-table-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--muted);
}

/* Status Badges */
.game-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    color: #fff6ef;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.55), rgba(255, 140, 66, 0.45));
    white-space: nowrap;
}

.game-status--maybe {
    background: linear-gradient(135deg, rgba(43, 104, 255, 0.95), rgba(92, 164, 255, 0.92));
}

.game-status--active {
    background: linear-gradient(135deg, rgba(46, 179, 78, 0.95), rgba(97, 215, 118, 0.9));
}

.game-status--completed {
    background: linear-gradient(135deg, rgba(42, 132, 192, 0.95), rgba(97, 175, 232, 0.9));
}

.game-status--abandoned {
    background: linear-gradient(135deg, rgba(192, 42, 42, 0.95), rgba(232, 97, 97, 0.9));
}

.game-status--casual {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.95), rgba(197, 138, 249, 0.9));
}

/* Admin Buttons */
.games-btn-add {
    padding: 0.3rem 0.55rem;
    border: 1px solid rgba(255, 160, 76, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #f2d3c4;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 150ms ease;
}

.games-btn-add:hover,
.games-btn-add:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 160, 76, 0.5);
    color: #fff6ef;
}

.games-actions-cell {
    text-align: right;
    width: 3rem;
}

.games-btn-delete {
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(232, 97, 97, 0.25);
    border-radius: 0.5rem;
    background: rgba(232, 97, 97, 0.08);
    color: #e86161;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 150ms ease;
}

.games-btn-delete:hover,
.games-btn-delete:focus-visible {
    background: rgba(232, 97, 97, 0.15);
    border-color: rgba(232, 97, 97, 0.4);
    transform: scale(1.05);
}

/* Modal */
.games-modal {
    max-width: 28rem;
    padding: 0;
    border: 1px solid rgba(255, 160, 76, 0.28);
    border-radius: 1.5rem;
    background: linear-gradient(165deg, rgba(22, 14, 28, 0.97), rgba(38, 18, 35, 0.95));
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.games-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.games-modal-inner {
    padding: 1.75rem 2rem 1.5rem;
}

.games-modal-title {
    margin: 0 0 1.35rem;
    font-size: 1.35rem;
    color: #ffe9de;
}

.games-modal-form {
    display: grid;
    gap: 1.1rem;
}

.games-modal-field {
    display: grid;
    gap: 0.45rem;
}

.games-modal-field > label {
    font-size: 0.8rem;
    color: #f2d3c4;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.games-modal-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(255, 179, 106, 0.22);
    border-radius: 0.85rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    appearance: none;
}

.games-modal-input:focus {
    outline: 2px solid rgba(157, 78, 221, 0.45);
    border-color: rgba(157, 78, 221, 0.5);
}

.games-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding-top: 0.2rem;
}

.games-modal-cancel {
    padding: 0.72rem 1.1rem;
    border: 1px solid rgba(255, 160, 76, 0.2);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 150ms ease, border-color 150ms ease;
}

.games-modal-cancel:hover,
.games-modal-cancel:focus-visible {
    color: var(--text);
    border-color: rgba(255, 160, 76, 0.38);
}

.games-modal-submit {
    padding: 0.72rem 1.25rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange-soft), var(--orange));
    color: #170d13;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(255, 140, 66, 0.22);
    transition: transform 150ms ease;
}

.games-modal-submit:hover,
.games-modal-submit:focus-visible {
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .games-table-tools {
        flex-direction: column;
        align-items: stretch;
    }
    
    .games-table-search {
        width: 100%;
    }
    
    .games-overview-stats {
        gap: 0.75rem;
    }
    
    .games-overview-stat {
        font-size: 0.875rem;
    }
    
    .games-quick-nav {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .games-quick-nav-item {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .games-quick-nav-icon {
        font-size: 1rem;
    }
    
    .games-table {
        min-width: 100%;
        font-size: 0.9rem;
    }
    
    .games-table thead th,
    .games-table tbody td {
        padding: 0.6rem 0.7rem;
    }
    
    .games-modal-inner {
        padding: 1.5rem 1.5rem 1.25rem;
    }
}

