/* =====================================
   Imposter Spiel - Smartphone Design
   style.css
===================================== */

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin:0;
    min-height:100dvh;
    background:
        linear-gradient(
            160deg,
            #111827,
            #020617
        );
    color:white;
    font-family:Arial, Helvetica, sans-serif;
    display:flex;
    justify-content:center;
    align-items:center;
    overflow:hidden;
}

/* =====================================
   Container
===================================== */

.container {
    width:100%;
    max-width:450px;
    height:100dvh;
    padding:20px;
    text-align:center;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

/* =====================================
   Texte
===================================== */

h1 {
    font-size: 42px;
    margin: 0 0 30px 0;
}

h2 {
    font-size: 32px;
}

p {
    font-size: 20px;
}

/* =====================================
   Karte
===================================== */

.card {
    width:100%;
    max-width:410px;
    height:min(55vh,430px);
    flex-shrink:0;
    align-self:center;
    perspective:1200px;
    margin-bottom:20px;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.7s ease;
    transform-style: preserve-3d;
    will-change:transform;
}

.card.flip .card-inner {
    transform: rotateY(180deg);
}

/* Vorder- und Rückseite */
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    background:
        linear-gradient(
            135deg,
            #334155,
            #1e293b
        );
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    -webkit-backface-visibility:hidden;
    backface-visibility:hidden;
}

/* Vorderseite */
.card-front h2 {
    margin-top: 0;
}

/* Rückseite */
.card-back {
    transform: rotateY(180deg);
}

/* =====================================
   Aufgedeckte Karte
===================================== */

.card-back h3 {
    position: absolute;
    top: 25px;
    margin: 0;
    font-size: 22px;
    opacity: 0.8;
}

.card-back h2 {
    margin: 20px 0 0 0;
    font-size: 34px;
    color:white;
}

/* =====================================
   Ampel Anzeige
===================================== */

.emoji {
    font-size: 80px;
    height: 100px;
    width: 100%;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:20px;
}

.card-back.player .emoji {
    filter: drop-shadow(0 0 10px #00e676);
}

.card-back.imposter .emoji {
    filter: drop-shadow(0 0 10px #ff1744);
}

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

.button-area,
.ready-area {
    height:90px;
    display:flex;
    justify-content:center;
    align-items:center;
}

button {
    width:100%;
    max-width:420px;
    min-width:300px;
    height:70px;
    padding:0 30px;
    border:none;
    border-radius:35px;
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );
    color:white;
    font-size:24px;
    font-weight:bold;
    cursor:pointer;
    box-shadow:0 8px 20px rgba(0,0,0,0.4);
    white-space:nowrap;
}

button:active {
    transform: scale(0.95);
}

/* Weiter Button */
#nextButton {
    background:
        linear-gradient(
            135deg,
            #f59e0b,
            #d97706
        );
}

/* Versteckter Button, Platz bleibt erhalten */
.hidden {
    visibility:hidden;
    pointer-events:none;
}

/* =====================================
   Einstellungen Button
===================================== */

.settings-button {
    position:fixed;
    top:15px;
    right:15px;
    width:42px;
    height:42px;
    display:flex;
    justify-content:center;
    align-items:center;
    background:
        linear-gradient(
            135deg,
            #334155,
            #1e293b
        );
    color:white;
    text-decoration:none;
    font-size:24px;
    line-height:1;
    border-radius:50%;
    box-shadow:0 5px 15px rgba(0,0,0,0.4);
    z-index:1000;
    padding:0;
    transition:transform .2s ease;
}

.settings-button:active {
    transform:scale(0.9) rotate(30deg);
}

/* =====================================
   Smartphones
===================================== */

@media(min-height:850px){
    .card {
        height:500px;
    }
}