:root{
    /* Light Mode */

    --bg:#f0f0f0;

    --surface:#ffffff;
    --surface2:#f7f7f7;

    --card:#ffffff;
    --card-hover:#f8f8f8;

    --border:#dddddd;

    --text:#333333;
    --muted:#666666;

    --accent:#8ca49c;
    --accent2:#6f8a82;

    --shadow:0 8px 25px rgba(0,0,0,.08);

    --radius:22px;
    --radiusSmall:16px;

    --transition:.22s ease;
}

@media (prefers-color-scheme: dark){

:root{

    --bg:#11121a;

    --surface:#1a1d28;
    --surface2:#202433;

    --card:rgba(255,255,255,.08);
    --card-hover:rgba(255,255,255,.12);

    --border:rgba(255,255,255,.08);

    --text:#ffffff;
    --muted:#b9c0d0;

    --accent:#8ca49c;
    --accent2:#6f8a82;

    --shadow:0 12px 35px rgba(0,0,0,.35);

}

}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    background:var(--bg);
    color:var(--text);
}

.container{
    width:min(1300px,100%);
    margin:auto;
    padding:28px;
}

.loading{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:90px;
    text-align:center;
    color:var(--muted);
    font-size:20px;
    backdrop-filter:blur(20px);
}

.hero{
    position:relative;
    overflow:hidden;

    background:
    linear-gradient(135deg,
    rgba(140,164,156,.22),
    rgba(255,255,255,.04));

    border:1px solid var(--border);

    border-radius:30px;

    padding:42px;

    margin-bottom:30px;

    backdrop-filter:blur(20px);

    box-shadow:var(--shadow);
}

.hero::before{
    content:"";
    position:absolute;

    width:320px;
    height:320px;

    border-radius:50%;

    background:rgba(140,164,156,.16);

    top:-130px;
    right:-100px;

    filter:blur(12px);
}

.heroTop{
    position:relative;
    z-index:2;

    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:25px;
    flex-wrap:wrap;
}

.title{
    font-size:44px;
    font-weight:800;
    letter-spacing:-1px;
    color:var(--text);
}

.subtitle{
    margin-top:12px;
    color:var(--muted);
    font-size:17px;
}

.stats{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-bottom:28px;
}

.statCard{
    background:var(--card);

    border:1px solid var(--border);

    border-radius:22px;

    padding:24px;

    backdrop-filter:blur(18px);

    transition:var(--transition);

    box-shadow:var(--shadow);
}

.statCard:hover{
    transform:translateY(-4px);
    background:var(--card-hover);
}

.statLabel{
    color:var(--muted);
    font-size:14px;
    margin-bottom:14px;
}

.statValue{
    color:var(--accent);
    font-size:38px;
    font-weight:800;
    line-height:1;
}

.grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px;
}

.card{
    background:var(--card);

    border:1px solid var(--border);

    border-radius:24px;

    padding:26px;

    backdrop-filter:blur(18px);

    box-shadow:var(--shadow);
}

.cardTitle{
    font-size:25px;
    font-weight:700;
    margin-bottom:22px;
}

/* ===========================
   Rangliste
=========================== */

.rankingItem{
    display:flex;
    justify-content:space-between;
    align-items:center;

    gap:18px;

    padding:18px 0;

    border-bottom:1px solid var(--border);

    transition:.2s;
}

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

.rankingItem:hover{
    transform:translateX(6px);
}

.rankLeft{
    display:flex;
    align-items:center;
    gap:16px;
}

.rank{
    width:44px;
    height:44px;

    border-radius:50%;

    background:linear-gradient(135deg,var(--accent),var(--accent2));

    color:white;

    display:flex;
    align-items:center;
    justify-content:center;

    font-weight:700;
    font-size:17px;

    flex-shrink:0;
}

.points{
    color:var(--accent);
    font-weight:700;
    font-size:18px;
}

/* ===========================
   Navigation
=========================== */

.navigation{

    display:flex;
    justify-content:center;
    align-items:center;

    gap:18px;

    margin-bottom:28px;

    flex-wrap:wrap;

}

.matchday{

    min-width:180px;

    text-align:center;

    padding:16px 26px;

    border-radius:18px;

    background:var(--card);

    border:1px solid var(--border);

    backdrop-filter:blur(18px);

    font-size:20px;

    font-weight:700;

    box-shadow:var(--shadow);

}

.navBtn{

    width:54px;
    height:54px;

    border:none;

    border-radius:18px;

    background:var(--card);

    color:var(--text);

    cursor:pointer;

    font-size:22px;

    transition:.2s;

    border:1px solid var(--border);

    backdrop-filter:blur(18px);

}

.navBtn:hover{

    background:var(--accent);

    color:#111;

    transform:translateY(-2px);

}

/* ===========================
   Spiele
=========================== */

.matches{

    display:flex;

    flex-direction:column;

    gap:18px;

}

.match{

    background:var(--card);

    border:1px solid var(--border);

    border-radius:22px;

    padding:22px;

    transition:.2s;

    backdrop-filter:blur(18px);

    box-shadow:var(--shadow);

}

.match:hover{

    transform:translateY(-4px);

    background:var(--card-hover);

}

.matchTop{

    display:grid;

    grid-template-columns:1fr auto 1fr;

    align-items:center;

    gap:20px;

}

.team{

    display:flex;

    align-items:center;

    gap:14px;

    min-width:0;

    font-size:17px;

    font-weight:600;

}

.team.right{

    justify-content:flex-end;

    text-align:right;

}

.team div{

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;

}

.logo{

    width:42px;

    height:42px;

    object-fit:contain;

    flex-shrink:0;

}

.result{

    min-width:110px;

    text-align:center;

    font-size:28px;

    font-weight:800;

    color:var(--accent);

}

.score{

    color:var(--accent);

    font-size:24px;

    font-weight:800;

}

.date{

    margin-top:18px;

    text-align:center;

    color:var(--muted);

    font-size:14px;

}

/* ===========================
   Buttons allgemein
=========================== */

button{

    font-family:inherit;

}

.primaryBtn{

    border:none;

    background:linear-gradient(135deg,var(--accent),var(--accent2));

    color:white;

    padding:14px 24px;

    border-radius:16px;

    font-size:15px;

    font-weight:700;

    cursor:pointer;

    transition:.2s;

}

.primaryBtn:hover{

    transform:translateY(-2px);

    filter:brightness(1.05);

}

/* ===========================
   Inputs
=========================== */

input,
select,
textarea{

    width:100%;

    padding:14px 16px;

    border-radius:16px;

    border:1px solid var(--border);

    background:rgba(255,255,255,.05);

    color:var(--text);

    font-size:15px;

    transition:.2s;

    outline:none;

}

input::placeholder,
textarea::placeholder{

    color:var(--muted);

}

input:focus,
select:focus,
textarea:focus{

    border-color:var(--accent);

    background:rgba(255,255,255,.08);

    box-shadow:0 0 0 4px rgba(140,164,156,.18);

}

/* ===========================
   Tabellen
=========================== */

table{

    width:100%;

    border-collapse:collapse;

    overflow:hidden;

    border-radius:18px;

}

th{

    text-align:left;

    background:rgba(255,255,255,.08);

    padding:16px;

    color:var(--text);

    font-weight:700;

}

td{

    padding:16px;

    border-top:1px solid var(--border);

}

tr{

    transition:.18s;

}

tbody tr:hover{

    background:rgba(255,255,255,.04);

}

/* ===========================
   Badges
=========================== */

.badge{

    display:inline-flex;

    align-items:center;

    padding:6px 12px;

    border-radius:999px;

    background:rgba(140,164,156,.18);

    color:var(--accent);

    font-size:13px;

    font-weight:700;

}

/* ===========================
   Scrollbar
=========================== */

::-webkit-scrollbar{

    width:10px;

    height:10px;

}

::-webkit-scrollbar-track{

    background:#11121a;

}

::-webkit-scrollbar-thumb{

    background:rgba(140,164,156,.45);

    border-radius:999px;

}

::-webkit-scrollbar-thumb:hover{

    background:var(--accent);

}

/* ===========================
   Animationen
=========================== */

.hero,
.card,
.statCard,
.match{

    animation:fadeUp .35s ease;

}

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(12px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ===========================
   Links
=========================== */

a{

    color:var(--accent);

    text-decoration:none;

    transition:.2s;

}

a:hover{
    color:var(--text);
}


/* ===========================
   Mobile
=========================== */

@media (max-width:1000px){

.grid{

    grid-template-columns:1fr;

}

.stats{

    grid-template-columns:repeat(auto-fit,minmax(170px,1fr));

}

.title{

    font-size:36px;

}

.hero{

    padding:30px;

}

}

@media (max-width:700px){

.container{

    padding:18px;

}

.hero{

    padding:24px;

    border-radius:22px;

}

.title{

    font-size:28px;

}

.subtitle{

    font-size:14px;

}

.card{

    padding:20px;

}

.cardTitle{

    font-size:22px;

}

.statValue{

    font-size:30px;

}

.match{

    padding:18px;

}

.matchTop{

    gap:12px;

}

.team{

    font-size:14px;

}

.logo{

    width:30px;

    height:30px;

}

.result{

    min-width:70px;

    font-size:20px;

}

.navigation{

    gap:10px;

}

.navBtn{

    width:46px;

    height:46px;

}

.matchday{

    min-width:140px;

    padding:12px 18px;

    font-size:16px;

}

}

@media (max-width:450px){

.matchTop{

    grid-template-columns:1fr;

    text-align:center;

}

.team,
.team.right{

    justify-content:center;

}

.result{

    margin:8px auto;

}

.heroTop{

    flex-direction:column;

    align-items:flex-start;

}

}
/* ===========================
   Tippen
=========================== */

.teams{

    display:grid;

    grid-template-columns:1fr auto 1fr;

    align-items:center;

    gap:18px;

}

.teamName{

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;

}

.center{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:10px;

    min-width:120px;

}

.input{

    width:48px;

    height:48px;

    border-radius:14px;

    border:1px solid var(--border);

    background:rgba(255,255,255,.06);

    color:var(--text);

    text-align:center;

    font-size:18px;

    font-weight:700;

    outline:none;

    transition:.2s;

}

.input:focus{

    border-color:var(--accent);

    background:rgba(255,255,255,.12);

    box-shadow:0 0 0 4px rgba(140,164,156,.15);

}

.locked{

    min-width:90px;

    text-align:center;

    font-size:22px;

    font-weight:800;

    color:var(--accent);

}

.saveBtn{

    width:100%;

    margin-top:28px;

    height:58px;

    border:none;

    border-radius:18px;

    background:linear-gradient(135deg,var(--accent),var(--accent2));

    color:white;

    font-size:17px;

    font-weight:700;

    cursor:pointer;

    transition:.2s;

    box-shadow:0 10px 25px rgba(140,164,156,.25);

}

.saveBtn:hover{

    transform:translateY(-2px);

    filter:brightness(1.05);

}

.saveBtn:active{

    transform:scale(.98);

}

/* ===========================
   Rangliste
=========================== */

.page-ranking .controls{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:18px;

    margin-bottom:28px;

    flex-wrap:wrap;

}

.page-ranking .tableWrap{

    background:var(--card);

    border:1px solid var(--border);

    border-radius:24px;

    overflow:auto;

    backdrop-filter:blur(18px);

    box-shadow:var(--shadow);

}

.page-ranking table{

    width:100%;

    min-width:900px;

    border-collapse:collapse;

}

.page-ranking thead{

    position:sticky;

    top:0;

    z-index:2;

    background:var(--card);

    backdrop-filter:blur(20px);

}

.page-ranking th{

    padding:18px 14px;

    text-align:center;

    color:var(--muted);

    font-size:13px;

    text-transform:uppercase;

    letter-spacing:.08em;

    border-bottom:1px solid var(--border);

    font-weight:700;

}

.page-ranking td{

    padding:16px 14px;

    text-align:center;

    border-bottom:1px solid var(--border);

    transition:.18s;

}

.page-ranking tbody tr:hover td{

    background:var(--card-hover);

}
.page-ranking td.rank{

    width:auto !important;
    height:auto !important;

    display:table-cell !important;

    padding:16px 14px !important;

    border-radius:0 !important;

    background:none !important;

    text-align:center;

    vertical-align:middle;

    color:var(--accent);

    font-weight:800;

}
.page-ranking tbody tr:last-child td{

    border-bottom:none;

}
.page-ranking thead tr{
    height:auto;
}

.page-ranking tbody tr{
    height:auto;
}
.page-ranking .rank{
    width:auto;
    height:auto;
    background:none;
    border-radius:0;

    display:block;

    line-height:1;

    padding:0;
    margin:0;

    color:var(--accent);
    font-weight:800;
    font-size:16px;
}

.page-ranking .name{

    text-align:left;

    font-weight:700;

    white-space:nowrap;

}

.page-ranking .points{

    color:var(--accent);

    font-weight:800;

}

.page-ranking .tip{

    color:var(--accent);

    font-weight:700;

}

.page-ranking .lock{

    color:var(--muted);

}

.page-ranking .matchHead{

    font-size:12px;

    line-height:1.5;

    color:var(--muted);

}

.page-ranking .tableWrap::-webkit-scrollbar{

    height:10px;

}

.page-ranking .tableWrap::-webkit-scrollbar-thumb{

    background:var(--accent);

    border-radius:999px;

}

.page-ranking .tableWrap::-webkit-scrollbar-thumb:hover{

    background:var(--accent);

}

@media(max-width:900px){

    .page-ranking .tableWrap{

        border-radius:18px;

    }

    .page-ranking table{

        min-width:760px;

    }

    .page-ranking th{

        padding:14px 10px;

        font-size:12px;

    }

    .page-ranking td{

        padding:14px 10px;

        font-size:13px;

    }

}

/* ===========================
   Seitenanimation
=========================== */

main{

    animation:pageIn .35s cubic-bezier(.22,1,.36,1);

}

@keyframes pageIn{

    from{

        opacity:0;

        transform:scale(.985) translateY(16px);

        filter:blur(4px);

    }

    to{

        opacity:1;

        transform:scale(1) translateY(0);

        filter:blur(0);

    }

}

/* ===========================
   Chat
=========================== */

.page-chat{

    display:flex;

    flex-direction:column;

    min-height:100vh;

}

.page-chat #messages{

    flex:1;

    overflow:auto;

    width:100%;

    max-width:1100px;

    margin:auto;

    padding:24px;

}

.page-chat .msg{

    max-width:70%;

    margin:12px 0;

    padding:16px 20px;

    border-radius:20px;

    background:var(--card);

    border:1px solid var(--border);

    backdrop-filter:blur(18px);

    box-shadow:var(--shadow);

    animation:fadeUp .2s ease;

}

.page-chat .me{

    margin-left:auto;

    background:linear-gradient(135deg,var(--accent),var(--accent2));

    color:var(--bg);

    border:none;

}

.page-chat .name{

    font-size:14px;

    font-weight:700;

    margin-bottom:8px;

}

.page-chat .time{

    margin-top:10px;

    font-size:12px;

    opacity:.7;

}

.page-chat img.chat{

    display:block;

    max-width:100%;

    margin-top:10px;

    border-radius:14px;

}

.page-chat #composer{

    position:sticky;
    bottom:0;

    width:100%;

    padding:18px 24px;

    border-top:1px solid var(--border);

    background:var(--bg);

}

.page-chat .inner{

    width:100%;

    display:grid;

    grid-template-columns:220px 1fr 150px;

    gap:14px;

    align-items:center;

}

.page-chat input[type=file]{

    width:220px;

}

.page-chat textarea{

    width:100%;

    min-width:0;

    height:58px;

}

.page-chat #send{

    width:150px;

    min-width:150px;

    height:58px;

    white-space:nowrap;

}

.page-chat .inner{

    display:grid;

    grid-template-columns:auto 1fr auto;

    gap:12px;

    align-items:end;

    width:100%;

    max-width:1100px;

    margin:auto;

}
.page-chat input[type="file"]{

    width:220px;

    max-width:220px;

}

.page-chat textarea{

    width:100%;

    min-width:0;

    resize:none;

    height:58px;

}

.page-chat button{

    

    width:auto;

    height:58px;

    padding:0 20px;

    white-space:nowrap;

}

.page-chat textarea{

    flex:1;

    min-width:0;

    resize:none;

    height:58px;

    padding:16px 18px;

    border-radius:18px;

    border:1px solid var(--border);

    background:rgba(255,255,255,.06);

    color:var(--text);

    font:inherit;

}

.page-chat button{

    width:58px;

    min-width:58px;

    height:58px;

    padding:0;

    border:none;

    border-radius:18px;

    background:linear-gradient(135deg,var(--accent),var(--accent2));

    color:#fff;

    font-size:22px;

    flex-shrink:0;

}
.page-chat button:hover{

    transform:translateY(-2px);

    filter:brightness(1.05);

}

.page-chat button:active{

    transform:scale(.98);

}

@media(max-width:700px){

    .page-chat #messages{

        padding:16px;

    }

    .page-chat .msg{

        max-width:90%;

    }

    .page-chat .inner{

        flex-direction:column;

    }

    .page-chat button{

        width:100%;

        height:52px;

    }

}
