* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

header {
    padding: 16px 20px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

textarea {
    flex: 1;
    width: calc(100% - 32px);
    margin: 16px;
    border: 1px solid #ddd;
    outline: none;
    resize: none;
    padding: 16px;
    font-size: 16px;
    border-radius: 8px;
}

.bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 12px 20px;
    border-top: 1px solid #ddd;
    font-size: 12px;
    color: #555;
    margin-bottom: 25px
}

.btn {
    padding: 8px 14px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 6px;
}

    .btn:hover {
        background: #eaeaea;
    }

.blue-button {
    background-color: #007BFF !important;
    border-color: #007BFF !important;
    color: white !important;
}

    .blue-button:hover,
    .blue-button:active,
    .blue-button:focus {
        background-color: #0056D2 !important;
        color: white !important;
    }

.grey-button {
    background-color: #6C757D !important;
    border-color: #6C757D !important;
    color: white !important;
}

    .grey-button:hover,
    .grey-button:active,
    .grey-button:focus {
        background-color: #5A6268 !important;
        color: white !important;
    }

.content {
    padding: 5px 16px;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* niewidoczny domyślnie */
    pointer-events: none; /* kliknięcia ignorowane, gdy niewidoczny */
    transition: opacity 0.3s ease;
}

    .popup.show {
        opacity: 1; /* widoczny */
        pointer-events: auto; /* kliknięcia aktywne */
    }

.popup-content {
    position: relative;
    background-color: #fff;
    border: 2px solid #3333cc;
    padding: 20px;
    width: 300px;
    min-height: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transform: scale(0.8); /* startowa skala dla efektu */
    transition: transform 0.3s ease;
}

.popup.show .popup-content {
    transform: scale(1); /* skaluje do pełnego rozmiaru przy pojawieniu */
}

#popupMessage {
    flex: 1;
    margin-bottom: 10px;
}

.popup-content button {
    align-self: flex-end;
    padding: 5px 15px;
    cursor: pointer;
}

#output {
    display: flex;
    align-items: center; 
    justify-content: center;
    height: 100vh;
    font-size: 1.5rem;
    font-weight: bold;
}