﻿:root {
    --color-a: #6D9DEB;
    --color-j: #F6B511;
    --color-m: #684295;
    --color-s: #20AE88;
    --color-t: #DF0559;
}

.word-grid {
    display: grid;
    gap: 8px;
    width: min(92vw, 420px);
    margin: 20px auto;
}

    .word-grid .row {
        display: grid;
        grid-template-columns: repeat(var(--word-length), 1fr);
        gap: 6px;
    }


.keyboard {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: min(100vw, 500px);
    margin: 0px auto 0px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}

.keyboard button {
    background: #DF0559;
    color: white;
    border: none;
    padding: 14px 0;
    /*min-width: 38px;*/
    font-weight: bold;
    flex: 1;
    min-height: 48px;
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.key-wide {
    min-width: 40px;
    flex: 1.5;
}
@keyframes wobble {
    0% {
        transform: translateY(0) scale(1);
    }

    25% {
        transform: translateY(-12px) scale(1.02);
    }

    50% {
        transform: translateY(0) scale(1);
    }

    75% {
        transform: translateY(10px) scale(0.98);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

.wordle-row {
    display: grid;
    gap: 8px;
}

.wordle-cell {
    width: 52px;
    height: 52px;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.cell-0 {
    background: #555;
    color: #aaa;
}

.cell-1 {
    background: var(--color-j);
    color: black;
}

.cell-2 {
    background: var(--color-s);
    color: white;
}
.key-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.key {
    padding: 12px;
    min-width: 36px;
    border-radius: 6px;
    background: var(--color-t);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

    .key.used {
        background: #000;
    }

.hint {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #aaa;
}

.key-0 {
    background: #555 !important;
    color: #aaa;
}

.key-1 {
    background: var(--color-j) !important;
    color: black;
}

.key-2 {
    background: var(--color-s) !important;
    color: white;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }

    100% {
        transform: translateX(0);
    }
}

.row.shake {
    animation: shake 0.35s ease;
}

.cell {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px solid #444;
    perspective: 800px;
    font-size: clamp(1.2rem, 5vw, 1.6rem);
}

.cell-inner {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.cell.flip .cell-inner {
    transform: rotateX(180deg);
}

.cell-front,
.cell-back {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: bold;
    backface-visibility: hidden;
}

.cell-back {
    transform: rotateX(180deg);
}
    /* Farben */
    .cell-front.cell-0,
    .cell-back.cell-0 {
        background: #555;
        color: #aaa;
    }

    .cell-front.cell-1,
    .cell-back.cell-1 {
        background: var(--color-j);
        color: black;
    }

    .cell-front.cell-2,
    .cell-back.cell-2 {
        background: var(--color-s);
        color: white;
    }

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .cell {
        border-width: 1.5px;
    }

    .keyboard {
        margin-top: 12px;
    }
}
.word-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Input-Bereich soll flexibel wachsen */
.word-input-wrapper {
    position: relative;
    flex: 1;
}

/* Select deutlich kleiner */
#lengthSelect {
    width: 80px;
    height: 40px;
    padding: 0 8px;
    font-size: 14px;
}

/* Input bekommt Platz für 2 Icons rechts */
#solutionInput {
    padding-right: 80px; /* Platz für Auge + Würfel */
    height: 40px;
    box-sizing: border-box;
}

/* Beide Buttons als Overlay im Input */
#toggleVisibility,
#randomButton {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

/* Auge ganz rechts */
#toggleVisibility {
    right: 10px;
}

/* Würfel links vom Auge */
#randomButton {
    right: 40px;
}
#wordbrawlcard {
    border: 1px solid transparent;
    border-radius: 8px;
    border-color: #F6B511;
}


/*difficulty*/


.difficulty {
    margin-top: 6px;
}

.difficulty-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 6px;
    background: gray;
}

/* Farben */
.diff-easy {
    background: var(--color-s);
}

.diff-moderate {
    background: var(--color-j);
}

.diff-hard {
    background: var(--color-t);
}

.diff-grey {
    background: #1e1e1e;
}