/* =========================
   GLOBAL
========================= */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    margin: 0;
    color: #222;
    padding-top: 80px;  
    animation: fadeIn 0.15s ease forwards;
}

a {
    text-decoration: none;
    color: #2b8a3e;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* =========================
   HEADER & NAVIGATION
========================= */
header {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: white;
    border-bottom: 1px solid #ddd;
    width: 100%;
}

.logo {
    height: 60px;
    width: 180px; /* fixer Platz */
    object-fit: contain;
    display: block;
}

nav a {
    margin-right: 20px;
    color: black;
}

nav a.active {
    color: #2b8a3e;
}

.profileBtn,
.save-btn,
button {
    background: #2b8a3e;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 7px 15px;
    cursor: pointer;
    font-weight: bold;
}

.profileBtn:hover,
.save-btn:hover,
button:hover {
    background: #23672c;
}

/* =========================
   LOGIN / REGISTER
========================= */
.box {
    background: white;
    padding: 25px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: center;
}

.box h1,
.box h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2b8a3e;
}

.box input,
.box select {
    width: 100%;
    padding: 8px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.error {
    margin-top: 8px;
    color: red;
    font-size: 13px;
}
.loginregister {
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.loginregister.log{
   align-items: center;
}
.loginregister.auswahl {
    align-items: flex-start;
    padding-top: 60px;
}


/* =========================
   DASHBOARD
========================= */

/* Willkommen Header */
.playerHeader{
    margin-bottom:25px;
}

.playerHeader h2{
    margin:0;
    color:#2b8a3e;
}

.playerHeader p{
    margin-top:5px;
}


/* Quick Stats Reihe */
.statsPanel{
    display:flex;
    gap:25px;
    margin-top:20px;

}


/* einzelne Stat Box */
.statBox{
    background:white;
    padding:20px 35px;
    border-radius:14px;
    box-shadow:0 4px 12px rgba(0,0,0,0.05);

    min-width:160px;
}

.statBox p{
    margin:0;
    color:#777;
    font-size:14px;
}

.statBox h1{
    margin:5px 0 0 0;
    font-size:34px;
    color:#2b8a3e;
}


/* QUICK ACTION KARTEN */

.quickActions{
    display:flex;
    gap:20px;
    margin:30px 0;
}

.actionCard{
    flex:1;
    background:white;
    padding:25px;
    border-radius:16px;
    cursor:pointer;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
    transition:.2s;
}

.actionCard:hover{
    transform:translateY(-4px);
}

.actionCard h3{
    margin:10px 0 5px 0;
    color:#2b8a3e;
}



/* NÄCHSTES MATCH */

.nextMatchBox{
    
    background:#2b8a3e;
    color:white;
    padding:20px;
    border-radius:16px;
    margin-top:20px;
 

}

.nextMatchBox h3{
    margin:0 0 5px 0;
}


/* =========================
   LAYOUT
========================= */
.wrapper {
    margin: auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    padding: 20px;
    align-items: start; /* verhindert runterdrücken */
}


main,
.players,
.rounds {
    background: white;
    border-radius: 20px;
    padding: 20px;
}

/* =========================
   Seiteleiste
========================= */
.players ul {
    list-style: none;
    padding: 0;
}

.players ul li {
    padding: 6px;
    cursor: pointer;
    border-radius: 8px;
}

.players ul li.active {
    background: #2b8a3e;
    color: white;
}

.rounds button {
    display: block;
    width: 100%;
    margin: 5px 0;
}


/* =========================
   Trainer Profil
========================= */
.profile-header {
    display: flex;
    align-items: center;
    background: white;
    padding: 20px;
    margin: 20px;
    gap: 20px;
    border-radius: 10px;
}

.profile-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #2b8a3e;
}

.profile-info h2 {
    margin: 0;
    font-size: 24px;
    color: #2b8a3e;
}

.profile-info p {
    margin-top: 5px;
    color: #555;
    font-weight: bold;
}

/* =========================
   TABS
========================= */
.tabs {
    display: flex;
    gap: 10px;
    margin: 20px;
}

.tabs button {
    background: #f3f3f3;
    color: black;
    border-radius: 5px;
}

.tabs button.active {
    background: #2b8a3e;
    color: white;
}

.tab-content {
    background: white;
    padding: 20px;
    margin: 0 20px 20px 20px;
    border-radius: 10px;
}

.tab-content input,
.tab-content select {
    width: 100%;
    padding: 8px;
    margin: 8px 0 15px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.teambox {
    background: white;
    padding: 20px;
    margin: 0 20px 20px 20px;
    border-radius: 10px;
}

/* =========================
   TABLES
========================= */
table {
    width: 100%;
    border-collapse: collapse;
}

th,td {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    text-align: center;
}


/* =========================
   MESSAGES
========================= */
.success {
    background: #e6f7ec;
    color: #1e7e34;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}






/* =========================
   ANALYSE LAYOUT
========================= */

/* gesamte Analyse untereinander */
.analysisGrid{
    display:flex;
    flex-direction:column;
    gap:25px;
    margin-bottom: 70px;
}


/* Ø Werte oben */
.avgwerte{
    display:flex;
    justify-content:flex-start; /* links ausrichten */
    gap:35px;                   /* Abstand statt Strecken */

    border-bottom:1px solid #eee;
    padding-bottom:10px;
}



/* einzelne KPI Box */
.rankingBox{
    padding:4px 10px;   /* vorher 15px -> macht sie riesig */
    border-radius:8px;
    text-align:left;    /* wirkt analytischer */
    background:none;    /* KEIN grauer Block */
    min-width:auto;
}

.rankingBox h3{
    font-size:19px;
    color:#777;
    margin:0;
    font-weight:normal;
}

.rankingBox h1{
    font-size:30px;
    margin:2px 0 0 0;
    color:black;
}


/* Charts nebeneinander */
.chartRow{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:20px;
}


/* verhindert riesige Charts */
.chartBox{
    height:240px;
}


/* =========================
   FILTER BAR
========================= */

.filterBar{
    display:flex;
    gap:10px;
    margin:20px 0 30px 0;
}

.filterBtn{
    padding:8px 18px;
    border-radius:20px;
    border:1px solid #ddd;
    background:white;
    cursor:pointer;
    transition:.2s;
    color: black;
   
}

.filterBtn:hover{
    background:#f3f3f3;
}

.filterBtn.active{
    background:#2b8a3e;
    color:white;
    
    border:none;
}


/* =========================
   TOP PERFORMER
========================= */

.topGrid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
    margin-bottom:30px;
}

.topBox{
    background:white;
    padding:20px;
    border-radius:18px;
    border:1px solid #eee;
}

.topBox h3{
    margin-top:0;
    color:#555;
}

.topPlayer{
    display:flex;
    justify-content:space-between;
    padding:8px 0;
    border-bottom:1px solid #f1f1f1;
}

.topPlayer:last-child{
    border-bottom:none;
}


/* =========================
   STARTSEITE
========================= */

.startseite {
    max-width: 1100px;
    margin: 120px auto 60px auto;
    padding: 0 20px;
}

.start-hero {
    margin-bottom: 40px;
}

.start-hero h2 {
    font-size: 38px;
    margin: 0;
    color: #2b8a3e;
}

.start-hero p {
    margin-top: 10px;
    font-size: 18px;
    color: #555;
    max-width: 700px;
}

.start-bereich {
    margin: 40px 0;
}

.start-einzelkarte {
    cursor: pointer;
}

.start-kontakt {
    cursor: default;
}

/* =========================
   MATCH VIEW – HEATMAP
========================= */

/* Grid für Stats + Heatmap */
.matchGrid {
    display: grid;
    grid-template-columns: 420px 1fr; /* links Stats fix, rechts flexibel */
    gap: 30px;
    margin-top: 20px;
}

/* Heatmap Container */
.heatmapBox {
    height: 520px;
    max-height: 65vh;
    border-radius: 18px;
    overflow: hidden;
    position: relative; /* wichtig für Button Position */
}

/* iframe füllt Container */
.heatmapBox iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Export Button oben rechts */
.exportHeatBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999; /* über der Map */
}


/* Inline-Auslagerung */
#mFull{grid-column:1/-1;}
#btnCancel{background:#777;}
#btnCancel:hover{background:#666;}
#mt15{margin-top:15px;}
#sMt15{margin-top:15px;}
#chartTop30{margin-top:30px;}
#rowClick{cursor:pointer;}
#phBetween{display:flex;justify-content:space-between;}
#m15y{margin:15px 0;}
#tdEmpty{text-align:center;color:#777;}
#tdState.ok{color:green;}
.tdState.ok{color:green;}
#tdState.muted{color:#555;}
.tdState.muted{color:#555;}
#txt666{color:#666;}
#txt666a{color:#666;}
#txt666b{color:#666;}
#mt10{margin-top:10px;}
#txt777{color:#777;}
#devices{display:none;}
#fInline2{display:inline;}
#btnDanger{background:#c0392b;}
#btnDanger:hover{background:#a93226;}
#startFoot{text-align:center;padding:40px;color:#777;}
#selStd{width:100%;padding:8px;margin:6px 0;border-radius:5px;}
#editForm{display:inline;}