/* Layout and base */
body {
    background: rgba(108, 120, 125, 0.35);
    min-height: 100vh;
    position: relative;
    font-family: Arial, sans-serif;
}

.title {
    font-size: 50px;
    color: #fff;
    margin: 20px 0 10px;
    position: relative;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

/* Guess dial + count */
.guess {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.guess-count {
    margin-top: 8px;
    font-size: 16px;
    color: #222;
}

/* Panels for letters */
.panels {
    position: relative;
    margin-top: 20px;
}
.correctLetter {
    position: absolute;
    right: 5%;
}
.incorrectLetter {
    position: absolute;
    left: 5%;
}
.correctLetter > i,
.incorrectLetter > i {
    display: block;
    margin-bottom: 8px;
}
.correctLetter > span,
.incorrectLetter > span {
    font-size: 32px;
    margin-right: 10px;
}

/* Word display */
.word {
    position: relative;
    margin-top: 120px;
    text-align: center;
    font-size: 36px;
    color: #111;
}

/* Input and actions */
.input > input {
    width: 200px;
    height: 40px;
    font-size: 28px;
    margin: 60px auto 0;
    display: block;
}
.button {
    font-size: 20px;
    color: #fff;
    background: #00BCD4;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
}
.button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}
.hint-button {
    font-size: 20px;
    color: #fff;
    background: #FFC107;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
}
.actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

/* Result / answer reveal styles */
.result {
    position: relative;
    margin-top: 30px;
    text-align: center;
}
.result-text {
    font-size: 24px;
    margin-bottom: 16px;
}
.result-text.win { color: #009688; }
.result-text.lose { color: #E91E63; }

.play-again {
    font-size: 22px;
    padding: 8px 16px;
    color: #fff;
    background: #00BCD4;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Inline loss-only placement below submit button */
.inline-answer {
    position: relative;
    margin-top: 20px;
    text-align: center;
}

/* Reveal animation and spacing for characters */
.reveal-char {
    display: inline-block;
    min-width: 20px;
    margin-right: 6px;
    text-align: center;
    letter-spacing: 0;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    animation: dropIn 400ms ease forwards;
    vertical-align: middle;
}
.reveal-char:last-child { margin-right: 0; }

.reveal-char:nth-child(1)  { animation-delay: 0ms; }
.reveal-char:nth-child(2)  { animation-delay: 60ms; }
.reveal-char:nth-child(3)  { animation-delay: 120ms; }
.reveal-char:nth-child(4)  { animation-delay: 180ms; }
.reveal-char:nth-child(5)  { animation-delay: 240ms; }
.reveal-char:nth-child(6)  { animation-delay: 300ms; }
.reveal-char:nth-child(7)  { animation-delay: 360ms; }
.reveal-char:nth-child(8)  { animation-delay: 420ms; }
.reveal-char:nth-child(9)  { animation-delay: 480ms; }
.reveal-char:nth-child(10) { animation-delay: 540ms; }
.reveal-char:nth-child(11) { animation-delay: 600ms; }
.reveal-char:nth-child(12) { animation-delay: 660ms; }
.reveal-char:nth-child(13) { animation-delay: 720ms; }
.reveal-char:nth-child(14) { animation-delay: 780ms; }
.reveal-char:nth-child(15) { animation-delay: 840ms; }

@keyframes dropIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prevent Angular template flicker before compilation */
[ng-cloak] { display: none !important; }
