.message-box {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(13, 25, 43, 0.55);
    z-index: 10050;
    animation: messageOverlayIn 0.18s ease;
    font-size: 0.95rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

@keyframes messageOverlayIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.message-box.hide {
    animation: messageOverlayOut 0.18s ease forwards;
}

@keyframes messageOverlayOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.message-content {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
    border: 1px solid #e5edf7;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.message-text {
    flex: 1;
    line-height: 1.4;
}

.message-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.message-close:hover {
    opacity: 1;
}

.message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message-success .message-icon {
    background: #155724;
    color: white;
}

.message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message-error .message-icon {
    background: #721c24;
    color: white;
}

.message-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.message-info .message-icon {
    background: #0c5460;
    color: white;
}

.message-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.message-warning .message-icon {
    background: #856404;
    color: white;
}

@media (max-width: 480px) {
    .message-box {
        padding: 12px;
    }

    .message-content {
        width: 100%;
        padding: 16px;
    }
}
