body {
    background: linear-gradient(to bottom, #ffc1e3 0%, #ffb6d5 100%);
    font-family: 'Arial', sans-serif;
    color: #333;
    text-align: center;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-attachment: fixed;
}

html, body {
    height: 100%;
    min-height: 100%;
}

.container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    padding-bottom: 100px;
}

.container-fluid {
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
    margin-right: auto;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-height: 56px;
}

h1 {
    font-size: 3em;
    color: #ff4d94;
    text-shadow: 0 0 10px rgba(255, 77, 148, 0.8);
    animation: fadeIn 2s ease-in-out;
}

.manufacturing-consent-regular {
    font-family: "Manufacturing Consent", system-ui;
    font-weight: 400;
    font-style: normal;
}

.letter {
    font-size: 1.2em;
    line-height: 1.6;
    color: #ff4d94;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    min-height: 150px;
    width: 100%;
    box-sizing: border-box;
    white-space: pre-line;
    overflow-wrap: break-word;
    word-break: normal;
    transition: all 0.3s ease;
    animation: fadeIn 2s ease-in-out;
}

button {
    background: #ff4d94;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-family: "PT Serif", serif;
    font-style: italic;
    font-weight: 400;
    transition: all 0.3s ease;
    margin: 20px 0;
    width: auto;
    min-width: 120px;
    height: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

    button:hover {
        background: #ff3385;
        transform: scale(1.05);
    }

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.big-paragraph {
    font-size: 1.7em;
    line-height: 1.6;
    white-space: pre-wrap;
}

.pt-serif-regular-italic {
    font-family: "PT Serif", serif;
    font-weight: 400;
    font-style: italic;
}

.navbar {
    background-color: #fff;
    border-bottom: 2px solid #ff4d94;
    min-height: 56px;
    height: auto;
    display: flex;
    justify-content: center;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.navbar-brand {
    font-family: "Manufacturing Consent", system-ui !important;
    color: #ff4d94;
    font-size: 1.5em;
    text-decoration: none;
}

.navbar-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.navbar-nav {
    display: flex;
    gap: 20px;
}

.navbar-toggler {
    position: relative;
    margin-right: 15px;
    z-index: 1050;
    border: 1px solid #ff4d94;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 0;
    align-self: center;
}

.nav-link.manufacturing-consent-regular {
    font-family: "Manufacturing Consent", system-ui !important;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

    .nav-link.manufacturing-consent-regular:hover {
        color: #ff4d94 !important;
    }

.nav-link.pt-serif-regular-italic {
    font-family: "PT Serif", serif !important;
    font-weight: 400;
    font-style: italic;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .nav-link.pt-serif-regular-italic:hover {
        color: #ff4d94 !important;
    }

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#hiddenPart {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

    #hiddenPart.visible {
        opacity: 1;
        transform: translateY(0);
    }

.letter-appear {
    animation: slideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#loginForm {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

.future-input {
    font-family: "Manufacturing Consent", system-ui;
    font-size: 1.3em;
    color: #ff4d94;
    background: #fff0fa;
    border: 2px solid #ff4d94;
    border-radius: 8px;
    padding: 10px 16px;
    margin-right: 10px;
    box-shadow: 0 2px 8px rgba(255,77,148,0.08);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 300px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

    .future-input:focus {
        border-color: #ff3385;
        box-shadow: 0 2px 12px rgba(255,77,148,0.18);
    }

th {
    font-size: 32px;
    border: none;
}

td {
    border: none;
    padding: 10px 0;
    vertical-align: middle;
}

table {
    border: none;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    table-layout: fixed;
    width: 80%;
}

th, td {
    width: auto;
}

    td:first-child {
        width: 70%;
        border-radius: 10px 0 0 10px;
        overflow: hidden;
        word-wrap: break-word;
    }

    td:last-child {
        width: 30%;
        border-radius: 0 10px 10px 0;
        overflow: hidden;
    }

.kitty-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 20px auto 0 auto;
    display: block;
    border-radius: 15px;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 1s ease-out;
}

    .kitty-image.visible {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

.login-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 40px;
    padding: 20px;
    position: relative;
}

.login-content {
    flex: 0 0 auto;
    z-index: 2;
}

.side-kitty {
    max-width: 200px;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    animation: floatIn 1.5s ease-out forwards;
    border-radius: 15px;
}

@keyframes floatIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.left-kitty {
    animation-delay: 0.3s;
}

.right-kitty {
    animation-delay: 0.6s;
}

.side-kitty:hover {
    transform: translateY(-5px) scale(1.05);
    transition: all 0.3s ease;
}

/* Исправление для фиксированной навигации */
main {
    margin-top: 56px;
}

/* Стили для формы добавления планов */
.add-plan-form {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.add-button {
    margin-left: 10px;
}

/* Стили для таблицы планов */
.plans-table {
    margin: auto;
    margin-top: 30px;
    width: 80%;
}

.plan-note-cell {
    word-wrap: break-word;
    width: 70%;
}

.action-cell {
    text-align: center;
    width: 30%;
}

.action-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.action-form {
    display: inline-block;
    margin-bottom: 5px;
}

.action-button {
    white-space: nowrap;
}

.plan-text {
    word-wrap: break-word;
    display: block;
}

.edit-input {
    width: calc(100% - 20px);
    margin: 0 10px;
    max-width: calc(100% - 20px);
    word-wrap: break-word;
}

/* Мобильная адаптация навигации */
@media (max-width: 991px) {
    .navbar {
        padding: 0.25rem 0;
    }

    .container-fluid {
        padding-right: 15px;
        padding-left: 15px;
    }

    .navbar-brand {
        font-size: 1.2em;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.1rem rgba(255, 77, 148, 0.5);
    }

    .navbar-collapse {
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        border-top: 1px solid #ff4d94;
        padding: 10px 0;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    .nav-item {
        padding: 5px 0;
    }

    .nav-link {
        padding: 10px 15px;
    }
}

/* Адаптация для планшетов */
@media (max-width: 1024px) {
    .login-page-container {
        flex-direction: column;
        gap: 20px;
    }

    .side-kitty {
        max-width: 150px;
        max-height: 200px;
    }
}

/* Адаптация основного контейнера для мобильных */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }

    .container {
        margin: 20px auto;
        padding: 15px;
        padding-bottom: 50px;
    }

    h1 {
        font-size: 2em;
    }

    .letter {
        font-size: 1em;
        padding: 15px;
    }

    .big-paragraph {
        font-size: 1.3em;
    }

    button {
        padding: 8px 16px;
        font-size: 0.9em;
        min-width: 100px;
    }

    .future-input {
        width: 100%;
        max-width: 250px;
        font-size: 1.1em;
        margin-right: 0;
        margin-bottom: 10px;
    }

    table {
        width: 100%;
    }

    th {
        font-size: 24px;
    }

    td {
        padding: 8px 5px;
    }

        td:first-child {
            width: 60%;
        }

        td:last-child {
            width: 40%;
        }

    .side-kitty {
        display: none;
    }

    #loginForm {
        min-height: calc(100vh - 156px);
        padding: 20px;
    }

    .login-page-container {
        min-height: calc(100vh - 56px);
        padding: 10px;
    }

    /* Адаптация для формы добавления планов */
    .add-plan-form {
        flex-direction: column;
        align-items: center;
    }

    .add-button {
        margin-left: 0;
        margin-top: 0;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-button {
        font-size: 0.8em;
        padding: 6px 12px;
        margin: 3px 0;
        min-width: 80px;
        width: 100%;
    }

    .plans-table {
        width: 100%;
    }

    .plan-note-cell {
        width: 60%;
    }

    .action-cell {
        width: 40%;
    }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1em;
    }

    h1 {
        font-size: 1.5em;
    }

    .letter {
        font-size: 0.9em;
        padding: 10px;
    }

    .big-paragraph {
        font-size: 1.1em;
    }

    th {
        font-size: 20px;
    }

    .kitty-image {
        max-width: 200px;
    }

    .action-button {
        font-size: 0.75em;
        padding: 5px 10px;
        min-width: 70px;
    }

    .plan-note-cell {
        font-size: 0.9em;
    }
}

/* Дополнительные улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    button {
        padding: 12px 24px;
    }

    .nav-link {
        padding: 12px 20px;
    }
}
