/* Grundlayout */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #4b2fc2;
    color: white;
    text-align: center;
    padding: 40px 0;
    transform: scale(0.8);
    transform-origin: top center;
}

/* Rahmen – WICHTIG: position: relative für Overlay */
.frame {
    border: 10px solid black;
    border-radius: 25px;
    width: 1400px;
    height: 800px;
    padding: 20px;
    margin: 0 auto;
    background: #4b2fc2;
    position: relative; /* FIX: Overlay sitzt jetzt exakt im Rahmen */
}

/* Quiz-Bereich */
.game-wrapper {
    width: 1400px;
    height: 900px;
    margin: 0 auto;
}

.title {
    font-size: 3rem;
    margin-bottom: 30px;
    font-weight: bold;
}

/* Board */
#board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 50px;
    margin: 0 auto;
}

.column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    max-width: 200px;
    line-height: 1.2;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 75px;
    transform: translateX(-20px);
}

/* Kleine Karten */
.card {
    width: 60px;
    height: 40px;
    perspective: 1000px;
    margin: 0 auto;
    cursor: pointer;
}

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

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 22px;
    border: 3px solid rgba(255,255,255,0.35);
    background: linear-gradient(180deg, #5a3bff 0%, #3b22d6 100%);
    box-shadow: 0 0 20px rgba(0,0,0,0.45), inset 0 0 12px rgba(255,255,255,0.25);
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.front {
    font-size: 3rem;
}

/* Overlay – jetzt perfekt im Rahmen */
.overlay {
    position: absolute;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.overlay-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 40;
}

/* Große Karte */
.big-card {
    width: 487px;
    height: 315px;
    perspective: 1500px;
    position: relative;
    z-index: 60;
}

.big-card-inner {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.big-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 250px;
    border: 4px solid rgba(255,255,255,0.5);
    background: linear-gradient(180deg, #5a3bff 0%, #3b22d6 100%);
    box-shadow: 0 0 30px rgba(0,0,0,0.6), inset 0 0 20px rgba(255,255,255,0.3);
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

.big-answer {
    background: #ff7de9;
    color: black;
    transform: rotateY(180deg);
}
