/* teacher/games-leaderboard — Oyunlar sekmesi */

.tgl-hub {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    max-width: 96rem;
}
.tgl-play-panel {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 1.5rem;
    padding: 1.35rem 1.4rem 1.45rem;
}
.tgl-play-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.05rem;
}

.tgl-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #eef2ff, #fff 52%, #ecfeff);
    border: 1px solid #c7d2fe;
    box-shadow: 0 8px 28px rgba(79, 70, 229, 0.1);
}

.tgl-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4f46e5;
}

.tgl-hero h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
    color: #0f172a;
}

.tgl-hero p {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
    max-width: 36rem;
}

.tgl-hero-stats {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.tgl-stat {
    min-width: 5.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #c7d2fe;
    text-align: center;
}

.tgl-stat strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 900;
    color: #3730a3;
}

.tgl-stat span {
    font-size: 0.62rem;
    font-weight: 800;
    color: #6366f1;
    text-transform: uppercase;
}

.tgl-play-panel {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 1.5rem;
    padding: 1.35rem 1.4rem 1.45rem;
}

.tgl-play-head h3 {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.3rem;
}

.tgl-play-head p {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
    max-width: 42rem;
}

.tgl-play-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.05rem;
}

@media (min-width: 640px) {
    .tgl-play-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .tgl-play-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.tgl-play-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.75rem 0.8rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s, background 0.15s;
}

.tgl-play-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.12);
}

.tgl-play-card.is-simon:hover { border-color: #2dd4bf; background: #f0fdfa; }
.tgl-play-card.is-xoxo:hover { border-color: #fb7185; background: #fff1f2; }
.tgl-play-card.is-math:hover { border-color: #fbbf24; background: #fffbeb; }
.tgl-play-card.is-bil:hover { border-color: #a78bfa; background: #f5f3ff; }
.tgl-play-card.is-rps:hover { border-color: #22d3ee; background: #ecfeff; }
.tgl-play-card.is-quoridor:hover { border-color: #fb923c; background: #fff7ed; }

.tgl-play-card span {
    font-size: 1.2rem;
    line-height: 1;
}

.tgl-play-card strong {
    font-size: 0.78rem;
    font-weight: 800;
    color: #1e293b;
}

.tgl-play-card em {
    font-size: 0.62rem;
    font-style: normal;
    color: #94a3b8;
}

.tgl-score-panel,
.tlb-score-panel {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 1.35rem;
    padding: 1rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}

.tlb-panel-head {
    padding-bottom: 0;
    margin-bottom: 0;
}

.tlb-panel-head h2 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
}

.tlb-panel-head p,
#teacher-lb-teacher-note {
    margin: 0.3rem 0 0;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.45;
}

.tlb-tabs-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tlb-tab-btn {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap;
}

.tlb-tab-btn:hover {
    border-color: #c7d2fe;
    color: #4338ca;
}

.tlb-tab-btn.is-active {
    border-color: #4f46e5;
    background: #eef2ff;
    color: #3730a3;
}

.tlb-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #fff;
}

.tlb-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.8rem;
    table-layout: fixed;
}

.tlb-table thead tr {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.tlb-table th {
    padding: 0.5rem 0.7rem;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.tlb-table th:nth-child(1) { width: 2.6rem; }
.tlb-table th:nth-child(3) { width: 5rem; text-align: right; }
.tlb-table th:nth-child(4) { width: 5.5rem; text-align: right; }

.tlb-table td {
    padding: 0.55rem 0.7rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.tlb-table tbody tr:last-child td {
    border-bottom: none;
}

.tlb-table tbody tr.is-top {
    background: #fffbeb;
}

.tlb-cell-rank {
    font-weight: 800;
    color: #475569;
    font-size: 0.78rem;
}

.tlb-cell-name {
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tlb-cell-score {
    text-align: right;
    font-weight: 900;
    color: #0f172a;
    font-size: 0.84rem;
}

.tlb-cell-score small {
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.62rem;
}

.tlb-cell-date {
    text-align: right;
    color: #94a3b8;
    font-size: 0.68rem;
    white-space: nowrap;
}

.tlb-empty {
    padding: 1.35rem 0.85rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.78rem;
    font-style: italic;
}

/* Öğretmen paneli genel tablo kart stillerini bu sekmede ez */
#teacher-panel #game-scores-view .tlb-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100%;
}

#teacher-panel #game-scores-view .tlb-table thead th {
    padding: 0.5rem 0.7rem !important;
    font-size: 0.62rem !important;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0 !important;
}

#teacher-panel #game-scores-view .tlb-table tbody tr {
    background: transparent;
    box-shadow: none;
}

#teacher-panel #game-scores-view .tlb-table tbody tr.is-top {
    background: #fffbeb;
}

#teacher-panel #game-scores-view .tlb-table tbody td {
    padding: 0.55rem 0.7rem !important;
    font-size: 0.8rem !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-radius: 0 !important;
}

#teacher-panel #game-scores-view .tlb-table tbody tr:last-child td {
    border-bottom: none !important;
}

#teacher-panel #game-scores-view .tlb-table tbody tr td:first-child,
#teacher-panel #game-scores-view .tlb-table tbody tr td:last-child {
    border-radius: 0 !important;
}

#teacher-panel #game-scores-view .tlb-empty {
    padding: 1.35rem 0.85rem !important;
    font-size: 0.78rem !important;
    border: none !important;
}

@media (max-width: 767px) {
    #game-scores-view {
        gap: 0.7rem !important;
    }

    .tgl-hero {
        padding: 0.95rem 1rem;
        border-radius: 1.15rem;
    }

    .tgl-hero h2 {
        font-size: 1.15rem;
    }

    .tgl-score-panel,
    .tlb-score-panel,
    .tgl-play-panel {
        padding: 0.8rem 0.85rem 0.9rem;
        border-radius: 1.1rem;
    }

    .tlb-tabs-scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.28rem;
        padding: 0 0 0.2rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tlb-tabs-scroll::-webkit-scrollbar {
        display: none;
    }

    .tlb-tab-btn {
        flex-shrink: 0;
        font-size: 0.62rem;
        padding: 0.32rem 0.55rem;
    }

    .tlb-table thead {
        display: none;
    }

    .tlb-table tbody tr {
        display: grid;
        grid-template-columns: 1.75rem minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 0.05rem 0.45rem;
        align-items: center;
        padding: 0.5rem 0.6rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .tlb-table tbody tr:last-child {
        border-bottom: none;
    }

    .tlb-table td {
        display: block;
        padding: 0;
        border: none;
    }

    #teacher-panel #game-scores-view .tlb-table tbody td {
        padding: 0 !important;
        border-bottom: none !important;
    }

    .tlb-cell-rank {
        grid-row: 1 / 3;
        grid-column: 1;
        font-size: 0.85rem;
        line-height: 1;
    }

    .tlb-cell-name {
        grid-column: 2;
        grid-row: 1;
        font-size: 0.78rem;
    }

    .tlb-cell-score {
        grid-column: 3;
        grid-row: 1 / 3;
        align-self: center;
        font-size: 0.86rem;
    }

    .tlb-cell-date {
        grid-column: 2;
        grid-row: 2;
        text-align: left;
        font-size: 0.58rem;
    }

    .tlb-empty {
        display: block;
        padding: 1rem 0.65rem;
        font-size: 0.72rem;
    }

    .tlb-table tbody tr:has(.tlb-empty) {
        display: block;
        padding: 0;
        grid-template-columns: none;
    }
}
