:root{
    --red:#c62828;
    --red-light:#ff8a80;

    --blue:#1565c0;
    --blue-light:#82b1ff;

    --dark:#111;
    --black:#000;
    --white:#fff;

    --warning:#ffc107;

    --radius:18px;
}

/* Reset */

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

    user-select:none;
    -webkit-tap-highlight-color:transparent;

    font-family:Arial, Helvetica, sans-serif;
}

html,
body{
    width:100%;
    height:100%;
    overflow:hidden;

    background:var(--dark);
    color:var(--white);
}

/* Portrait-Hinweis */

#rotateNotice{
    position:fixed;
    inset:0;

    background:var(--dark);

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

    text-align:center;
    padding:20px;

    z-index:9999;
}

#rotateNotice h1{
    margin-top:20px;
}

/* App */

#app{
    width:100%;
    height:100%;

    display:flex;
    flex-direction:column;
}

/* Hauptbereich */

.main{
    flex:1;
    display:flex;
    overflow:hidden;
}

/* Rot / Blau */

.side{
    flex:1;

    display:flex;
    flex-direction:column;

    padding:6px;
}

.red{
    background:var(--red);
}

.blue{
    background:var(--blue);
}

/* Titel */

.title{
    text-align:center;
    font-size:1.25rem;
    font-weight:bold;

    padding:6px 0;
}

/* Bewertungsbereich */

.area{
    flex:1;
    display:flex;
    overflow:hidden;
}

.red .area{
    flex-direction:row;
}

.blue .area{
    flex-direction:row-reverse;
}

/* Buttonspalte */

.controls{
    width:140px;

    display:flex;
    flex-direction:column;
    gap:6px;
}

/*
 * Die beiden Hauptbuttons sollen
 * nahezu die komplette Höhe einnehmen
 */

.action{
    flex:1;

    border:none;
    border-radius:var(--radius);

    color:white;
    cursor:pointer;

    font-size:2.4rem;
    font-weight:bold;

    touch-action:manipulation;
}

.error{
    background:rgba(0,0,0,.35);
}

.plus{
    background:rgba(255,255,255,.18);
}

/* Mittlere Anzeige */

.center{
    flex:1;

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

    text-align:center;
}

/* Punktzahl */

.score{
    font-size:min(20vw,8rem);
    line-height:1;

    font-weight:bold;
}

.score-null{
    color:#ffeb3b;
}

/* Fehler / Plus */

.stats{
    margin-top:10px;

    font-size:1rem;
    line-height:1.6;
}

/* Undo */

.undo{
    display:flex;
    gap:8px;

    margin-top:12px;
}

.undo button{
    border:none;

    padding:6px 10px;

    border-radius:8px;

    background:rgba(0,0,0,.25);
    color:white;

    cursor:pointer;
    font-size:.85rem;
}

/* Nullwertung */

.zeroRow{
    margin-top:8px;
}

.zeroBtn{
    border:none;

    padding:6px 14px;

    border-radius:8px;

    background:#000;
    color:#ff5252;

    cursor:pointer;

    font-weight:bold;
    font-size:.9rem;
}

/* Footer */

.footer{
    height:48px;

    background:#000;

    display:flex;
    align-items:center;

    gap:10px;
    padding:0 10px;
}

/* Sieger */

#winner{
    flex:1;

    text-align:center;
    font-size:1.2rem;
    font-weight:bold;
}

.winner-red{
    color:var(--red-light);
}

.winner-blue{
    color:var(--blue-light);
}

.winner-draw{
    color:var(--white);
}

/* Reset */

.reset{
    width:36px;
    height:36px;

    border:none;
    border-radius:50%;

    background:var(--warning);
    color:#000;

    cursor:pointer;
    font-size:1rem;
    font-weight:bold;
}

/* Portrait-Sperre */

@media (orientation: portrait){

    #rotateNotice{
        display:flex;
    }

    #app{
        display:none;
    }
}

/* Sehr kleine Geräte */

@media (max-height:500px){

    .controls{
        width:120px;
    }

    .action{
        font-size:2rem;
    }

    .score{
        font-size:min(18vw,6.5rem);
    }

    .stats{
        font-size:.9rem;
    }
}