/* =========================================
   PAPPAS INSIDE – PLAYER DASHBOARD STYLING
========================================= */

/* -----------------------------------------
   Algemene layout
----------------------------------------- */
body {
    background: url('/afbeelding/padelkooi2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    color: #fff;
}

/* -----------------------------------------
   Titels
----------------------------------------- */
h1, h2 {
    font-size: 2.4rem;
    color: #003366;
    margin-bottom: 10px;
    text-shadow: none;
}

p {
    color: #003366;
    opacity: 0.9;
}

/* -----------------------------------------
   Stat Cards (witte fade)
----------------------------------------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin-top: 25px;
}

.stat-card {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    padding: 18px 20px;
    color: #003366;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    backdrop-filter: blur(4px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.stat-card h3 {
    color: #003366;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-card p {
    color: #003366;
}

/* -----------------------------------------
   Vormmeter balk
----------------------------------------- */
#form-bar {
    background: rgba(0,51,102,0.12);
    border-radius: 6px;
    overflow: hidden;
    height: 12px;
    margin-top: 10px;
}

#form-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* -----------------------------------------
   Uitleg-kader boven grafieken
----------------------------------------- */
.graph-info {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    padding: 18px 22px;
    max-width: 900px;
    margin: 30px auto 15px auto;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    text-align: left;
}

.graph-info h3 {
    margin: 0 0 10px 0;
    color: #003366;
}

.graph-info p {
    color: #003366;
    line-height: 1.5;
}

/* -----------------------------------------
   Grafieken (canvas)
----------------------------------------- */
canvas,
#rankingChart {
    width: 100%;
    max-width: 900px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    padding: 15px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

/* -----------------------------------------
   Tabellen (H2H, Synergie, Geschiedenis)
----------------------------------------- */
.history-table {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    border-collapse: collapse;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.history-table th {
    background: rgba(0,51,102,0.08);
    padding: 12px 15px;
    text-align: left;
    color: #003366;
    font-weight: 700;
}

.history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0,51,102,0.12);
    color: #003366;
}

.history-table tr:hover {
    background: rgba(0,51,102,0.06);
}

/* -----------------------------------------
   H2H & Synergie secties
----------------------------------------- */
.h2h-section,
.synergy-section {
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    max-width: 900px;
    color: #003366;
}

/* H2H kleurcodering */
.h2h-positive {
    background: rgba(0,200,0,0.12);
}

.h2h-negative {
    background: rgba(200,0,0,0.12);
}

.h2h-neutral {
    background: rgba(0,51,102,0.06);
}

.synergy-top {
    background: rgba(0,200,0,0.12);
}
.synergy-good {
    background: rgba(255,200,0,0.18);
}
.synergy-medium {
    background: rgba(255,120,0,0.18);
}
.synergy-bad {
    background: rgba(200,0,0,0.18);
}

/* -----------------------------------------
   Ranking wrapper
----------------------------------------- */
#ranking-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    max-width: 900px;
}

#ranking {
    flex: 1;
}

#rankingChart {
    flex: 1;
    height: 200px !important;
}

/* -----------------------------------------
   Responsive
----------------------------------------- */
@media (max-width: 850px) {
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .stat-card {
        padding: 15px;
    }

    canvas {
        padding: 10px;
    }

    #ranking-wrapper {
        flex-direction: column;
    }
}

/* ============================================
   SECTIE CARDS (Ranking + Wedstrijdgeschiedenis)
============================================ */

.card-section {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    padding: 20px;
    margin: 30px auto;
    max-width: 900px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    backdrop-filter: blur(4px);
    text-align: left;
}

.card-section h3 {
    color: #003366;
    font-size: 1.6rem;
    margin-bottom: 15px;
}
/* ============================================
   UNIFORME BREEDTE VOOR ALLE SECTIES
============================================ */

.section-block,
.card-section,
.h2h-section,
.synergy-section,
#history-section,
#ranking-section {
    width: 100%;
    max-width: 900px;      /* zelfde breedte als stat-cards */
    margin: 30px auto;     /* mooie spacing */
    padding: 20px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    backdrop-filter: blur(4px);
    color: #003366;
    text-align: center;
}

/* Titels binnen secties */
.section-block h3,
.card-section h3,
.h2h-section h3,
.synergy-section h3,
#history-section h3,
#ranking-section h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #003366;
}

/* ============================================
   PAGINA HEADER CARD
============================================ */
.page-header {
    width: 100%;
    max-width: 900px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    backdrop-filter: blur(4px);
    text-align: center;
}
/* ============================================
   TOERNOOI / COMPETITIE / CLUTCH / VERGELIJKING
============================================ */

#tournament-card,
#competition-card,
#compare-card,
#clutch-card,
#tournament-history {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    backdrop-filter: blur(4px);
    color: #003366;
    text-align: center;
}

#tournament-card h3,
#competition-card h3,
#compare-card h3,
#clutch-card h3,
#tournament-history h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #003366;
}
/* ============================================
   WINSTREAK BADGE
============================================ */

#streak-badge {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    text-align: center;
    color: #003366;
}

.streak-glow {
    color: #ff0000;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(255,0,0,0.6);
}
/* ============================================
   BESTE PARTNER ALL-TIME
============================================ */

#best-partner {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    text-align: center;
    color: #003366;
}
#tournament-history table tr td:first-child {
    font-weight: 600;
}
.section-block h3,
.card-section h3,
.h2h-section h3,
.synergy-section h3,
#history-section h3,
#ranking-section h3,
#tournament-card h3,
#competition-card h3,
#compare-card h3,
#clutch-card h3,
#tournament-history h3 {
    text-align: center;
    color: #003366;
}
.history-table th,
.history-table td {
    text-align: center;
}
#tournament-history td {
    font-size: 1.05rem;
}

/* ANALYSEKAART – volledig in Pappas Inside stijl */
#player-analysis {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.88)
    );
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    backdrop-filter: blur(4px);
    color: #003366;
    text-align: center;
}

.analysis-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #003366;
}

.analysis-section {
    margin-bottom: 22px;
}

/* Badges in jouw stijl */
.analysis-badge {
    display: inline-block;
    background: rgba(0,51,102,0.08);
    color: #003366;
    padding: 6px 12px;
    border-radius: 12px;
    margin: 6px;
    font-size: 0.9rem;
    border: 1px solid rgba(0,51,102,0.15);
}

/* Scoremeter in jouw stijl */
.analysis-meter {
    width: 100%;
    background: rgba(0,51,102,0.12);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.analysis-meter-fill {
    height: 100%;
    background: #003366;
    border-radius: 6px;
    transition: width 0.4s ease;
}

.analysis-badge-consistency {
    display: inline-block;
    background: rgba(0,51,102,0.08);
    color: #003366;
    padding: 6px 12px;
    border-radius: 12px;
    margin: 6px;
    font-size: 0.9rem;
    border: 1px solid rgba(0,51,102,0.15);
}

.analysis-info-popup {
    display: none;
    position: absolute;
    background: rgba(255,255,255,0.95);
    border: 2px solid rgba(0,51,102,0.15);
    border-radius: 12px;
    padding: 15px;
    width: 260px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    color: #003366;
    text-align: left;
    z-index: 999;
}

.analysis-info-icon {
    display: inline-block;
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    color: #003366;
}
.back-btn-corner {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 9999;

    background: linear-gradient(135deg, #003366, #7EC8FF);
    border: 2px solid white;
    color: white;
    padding: 10px 22px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(0,51,102,0.35);
    backdrop-filter: blur(5px);
    transition: 0.3s ease;
}

.back-btn-corner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,51,102,0.55);
}
