* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #fff;
    min-height: calc(100vh / 1.1);
    display: flex;
    flex-direction: column;
    zoom: 1.1;
    /* Compensate for position:fixed .header (44px content + 1px border = 45px).
       Every page benefits from this, including ones that don't use .main wrapper
       (crossword-editor-page, game-page, about-page). */
    padding-top: 45px;
}

.header {
    background-color: #e6e6e6;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #ccc;
    z-index: 10;
    grid-template-columns: 28px 1fr;
    min-height: 44px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.header-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    grid-column: 2;
}

.back-btn {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: #4d49fc;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s, transform 0.2s;
}

.back-btn:hover {
    background: #28209c;
    transform: scale(1.08);
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.btn {
    padding: 10px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #fff;
    background: #4d49fc;
}

.btn:hover {
    background: #28209c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 73, 252, 0.35);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.back-form {
    display: flex;
    align-items: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-window {
    position: relative;
    background-color: #e6e6e6;
    border: 1px solid #999;
    width: 530px;
    padding: 35px 20px;
    text-align: center;
    color: #1a1a1a;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.close-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background-color: #e02828;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    line-height: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-btn:hover {
    background-color: #c91f1f;
}

.modal-title {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.modal-text {
    font-size: 14.5px;
    line-height: 1.4;
    margin-bottom: 18px;
}

.modal-text.names-list {
    margin-bottom: 25px;
    line-height: 1.45;
}

.modal-text.year {
    margin-bottom: 0;
}

.action-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    color: #fff;
    background: #4d49fc;
    transition: all 0.25s;
}

.action-btn:hover {
    background: #28209c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 73, 252, 0.35);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Global status/notification banners */
.editor-status-banner {
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13.5px;
    text-align: center;
    animation: fadeIn 0.2s ease-out;
}

.editor-status-banner.error {
    background-color: #ffeaea;
    border: 1px solid #ff9999;
    color: #b91c1c;
}

.editor-status-banner.success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}