/* tournament_results.css - Professional and cheerful tournament results page */

/* ========================================
   TOURNAMENT RESULTS CONTAINER
   ======================================== */

.tournament-results-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

.results-header {
    background: linear-gradient(135deg, #04404f  0%, #124a56ff 100%);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.results-header::before {
    content: '🎉';
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 48px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

.results-header::after {
    content: '🏆';
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 48px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite 1.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.results-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.results-header-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.results-header-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.results-header-info-item .icon {
    font-size: 1.3em;
}

/* ========================================
   WINNER ANNOUNCEMENT
   ======================================== */

.winner-announcement {
    background: linear-gradient(135deg, #1a2a6c 0%, #5f4e06ff 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(255, 210, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.winner-announcement::before {
    content: '✨';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 36px;
    animation: sparkle 2s ease-in-out infinite;
}

.winner-announcement::after {
    content: '✨';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 36px;
    animation: sparkle 2s ease-in-out infinite 1s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.winner-announcement-title {
    font-size: 1.3em;
    color: #fff;
    margin: 0 0 10px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.winner-announcement-name {
    font-size: 2.5em;
    color: #fff;
    margin: 0;
    font-weight: 800;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.winner-trophy {
    font-size: 4em;
    display: block;
    margin-bottom: 15px;
    animation: trophy-bounce 2s ease-in-out infinite;
}

@keyframes trophy-bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* ========================================
   RESULTS TABLE CONTAINER
   ======================================== */

.results-table-container {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

.results-table-title {
    font-size: 1.8em;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    font-weight: 700;
    text-align: center;
}

/* ========================================
   RESULTS TABLE
   ======================================== */

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.results-table thead {
    background: linear-gradient(135deg, #134e5e 0%, #296437ff 100%);
    color: #fff;
}

.results-table thead th {
    padding: 18px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.results-table thead th:first-child {
    border-top-left-radius: 12px;
    text-align: left;
    padding-left: 24px;
}

.results-table thead th:last-child {
    border-top-right-radius: 12px;
}

.results-table tbody tr {
    transition: all 0.3s ease;
    background: #fff;
}

.results-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.results-table tbody tr:hover {
    background: #e0f7fa;
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.results-table tbody td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid #ff3903ff;
    font-size: 1em;
    color: var(--text-secondary);
}

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

.results-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.results-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* ========================================
   PLAYER NAME CELL
   ======================================== */

.player-name-cell {
    text-align: left !important;
    font-weight: 700;
    padding-left: 24px !important;
    color: var(--text-primary);
    position: relative;
}

.player-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    margin-right: 12px;
    font-size: 0.9em;
}

/* Trophy/Medal for top 3 */
.player-rank.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    font-size: 1.1em;
}

.player-rank.rank-1::after {
    content: '🥇';
    position: absolute;
    font-size: 1.2em;
}

.player-rank.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
}

.player-rank.rank-2::after {
    content: '🥈';
    position: absolute;
    font-size: 1.2em;
}

.player-rank.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e5a76d 100%);
    color: #fff;
}

.player-rank.rank-3::after {
    content: '🥉';
    position: absolute;
    font-size: 1.2em;
}

/* ========================================
   SCORE CELLS
   ======================================== */

.score-cell {
    font-weight: 500;
    color: var(--text-secondary);
}

.score-cell.high-score {
    background: linear-gradient(135deg, #a8e6cf 0%, #56ccf2 100%);
    font-weight: 700;
    color: #0d47a1;
}

.total-score-cell {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%) !important;
    font-weight: 800 !important;
    font-size: 1.15em !important;
    color: #fff !important;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.no-results-message {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-results-message .icon {
    font-size: 5em;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results-message h3 {
    font-size: 1.8em;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}

.no-results-message p {
    font-size: 1.1em;
    color: var(--text-muted-light);
    margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .results-header {
        padding: 30px 20px;
    }

    .results-header h1 {
        font-size: 1.8em;
    }

    .results-header::before,
    .results-header::after {
        font-size: 32px;
    }

    .results-header-info {
        gap: 15px;
    }

    .results-header-info-item {
        font-size: 0.95em;
        padding: 8px 16px;
    }

    .winner-announcement {
        padding: 25px 15px;
    }

    .winner-announcement-name {
        font-size: 1.8em;
    }

    .winner-trophy {
        font-size: 3em;
    }

    .results-table-container {
        padding: 20px 15px;
        overflow-x: auto;
    }

    .results-table {
        font-size: 0.9em;
    }

    .results-table thead th,
    .results-table tbody td {
        padding: 12px 8px;
    }

    .player-name-cell {
        padding-left: 12px !important;
    }

    .player-rank {
        width: 28px;
        height: 28px;
        font-size: 0.85em;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .tournament-results-page {
        padding: 2px;
    }

    .results-header {
        padding: 16px 8px;
        border-radius: 10px;
        margin-bottom: 16px;
    }

    .results-header::before,
    .results-header::after {
        font-size: 24px;
    }

    .results-header h1 {
        font-size: 1.2em;
    }

    .results-header-info {
        flex-direction: column;
        gap: 6px;
        margin-top: 10px;
    }

    .results-header-info-item {
        font-size: .75rem;
        padding: 4px 10px;
    }

    .winner-announcement {
        padding: 16px 8px;
        border-radius: 10px;
        margin-bottom: 16px;
    }

    .winner-announcement::before,
    .winner-announcement::after {
        font-size: 20px;
    }

    .winner-trophy {
        font-size: 2em;
        margin-bottom: 8px;
    }

    .winner-announcement-title {
        font-size: .8rem;
        letter-spacing: 1px;
    }

    .winner-announcement-name {
        font-size: 1.2em;
    }

    .results-table-container {
        padding: 8px 4px;
        border-radius: 10px;
    }

    .results-table-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .results-table {
        font-size: .7rem;
    }

    .results-table thead th {
        padding: 6px 3px;
        font-size: .65rem;
        letter-spacing: 0;
    }

    .results-table thead th:first-child {
        padding-left: 6px;
    }

    .results-table tbody td {
        padding: 8px 3px;
        font-size: .75rem;
    }

    .player-name-cell {
        font-size: .75rem;
        padding-left: 4px !important;
    }

    .player-rank {
        width: 20px;
        height: 20px;
        font-size: .6rem;
        margin-right: 4px;
    }

    .player-rank.rank-1::after,
    .player-rank.rank-2::after,
    .player-rank.rank-3::after {
        font-size: .7em;
    }

    .total-score-cell {
        font-size: .8rem !important;
    }

    .no-results-message {
        padding: 30px 10px;
    }

    .no-results-message .icon {
        font-size: 3em;
    }

    .no-results-message h3 {
        font-size: 1.1em;
    }

    .no-results-message p {
        font-size: .85rem;
    }
}
