/* --- RESET I PODSTAWY --- */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f5f5f7;
    color: #1d1d1f;
}

/* --- KARTA GŁÓWNA --- */
#card {
    background: #ffffff;
    padding: 2.5rem 1.5rem;
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.06);
    text-align: center;
    width: 90%;
    max-width: 400px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(0,0,0,0.03);
}

/* --- SEKCJA TEKSTOWA --- */
#display-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.word-pl {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

/* Sekcja odpowiedzi sterowana przez JS */
#answer-section {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f2f2f2;
}

#answer-section.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Styl dla Jidysz (Powiększony i wyraźny) */
.word-yi {
    font-size: 3.2rem;
    color: #000;
    direction: rtl;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

/* Styl dla transkrypcji */
.trans {
    font-size: 1.3rem;
    color: #86868b;
    font-style: italic;
    font-weight: 400;
}

/* --- PRZYCISK --- */
button {
    background-color: #0071e3;
    color: #ffffff;
    border: none;
    padding: 18px 20px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 2rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.15);
}

button:active {
    transform: scale(0.96);
    background-color: #005bb7;
}

/* Przycisk w trybie "Następne" */
button.next-mode {
    background-color: #34c759;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.15);
}

/* --- STYLE DLA PANELU ADMINA / LOGOWANIA --- */
.admin-form, .login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1rem;
}

input {
    width: 100%;
    padding: 14px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 1rem;
    background-color: #fbfbfd;
    transition: border-color 0.2s ease;
}

input:focus {
    outline: none;
    border-color: #0071e3;
    background-color: #fff;
}

/* Pole Jidysz w formularzu (wymuszone RTL) */
input[name="yiddish"] {
    direction: rtl;
    text-align: right;
    font-size: 1.4rem;
}

.flash-messages {
    color: #34c759;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0;
    list-style: none;
}

.logout-link, .back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: #06c;
    text-decoration: none;
    font-size: 0.9rem;
}

.logout-link:hover, .back-link:hover {
    text-decoration: underline;
}

/* --- DOPASOWANIE DO MAŁYCH EKRANÓW --- */
@media (max-height: 700px) {
    #card {
        padding: 1.5rem 1rem;
        min-height: 300px;
    }
    .word-yi {
        font-size: 2.6rem;
    }
    .word-pl {
        font-size: 1.5rem;
    }
}
